| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 56d6756 commit aeb0f3c
24 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,6 +29,7 @@ | |||
| 29 | 29 | > | |
| 30 | 30 | <mapgis-3d-arcgis-tile-layer | |
| 31 | 31 | :base-url="tileurl" | |
| 32 | + :tiling-scheme="tilingScheme" | ||
| 32 | 33 | :layer-style="layerStyle"> | |
| 33 | 34 | </mapgis-3d-arcgis-tile-layer> | |
| 34 | 35 | </mapgis-web-scene> | |
@@ -38,6 +39,7 @@ | |||
| 38 | 39 | el: '#app', | |
| 39 | 40 | data() { | |
| 40 | 41 | return { | |
| 42 | + tilingScheme:"EPSG:3857", | ||
| 41 | 43 | tileurl:"http://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer", | |
| 42 | 44 | layerStyle: { | |
| 43 | 45 | visible: true, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,7 +25,7 @@ | |||
| 25 | 25 | <mapgis-3d-ogc-wms-layer | |
| 26 | 26 | :base-url="baseUrl" | |
| 27 | 27 | :layers="layers" | |
| 28 | - :srs="srs" | ||
| 28 | + :tiling-scheme="tilingScheme" | ||
| 29 | 29 | :layer-style="layerStyle"></mapgis-3d-ogc-wms-layer> | |
| 30 | 30 | </mapgis-web-scene> | |
| 31 | 31 | </div> | |
@@ -36,7 +36,7 @@ | |||
| 36 | 36 | return { | |
| 37 | 37 | baseUrl: 'http://develop.smaryun.com:6163/igs/rest/ogc/doc/北京市/WMSServer', | |
| 38 | 38 | layers: '北京市,绿地_1,绿地_2,绿地_3,绿地_4,水域_3,水域_2,水域_1,大学,学校,动物园,高尔夫,观光胜地,果园,住宅用地,医院,商业用地,建筑物,铁路_1,铁路_2,铁路_3,主干道,主干道,高速公路_1,高速公路_1_9-10,三级道路_链接,三级道路,二级道路_链接,二级道路,一级道路_链接,一级道路,主干道_链接,主干道,主干道,高速公路_链接,高速公路_2,高速公路_2,三级道路_链接,三级道路,二级道路_链接,二级道路,一级道路_链接,一级道路,地铁,主干道_链接,主干道,主干道,高速公路_链接,高速公路_2,高速公路_2,地铁站POI,山顶,果园poi,汽车站点POI,大学poi,学校poi,中小学POI,幼儿园POI,医院POI,口腔医院POI,派出所POI,检察院POI,银行POI,邮局POI,体育馆POI,纪念碑POI,博物馆POI,名胜古迹点,动物园poi,观光胜地poi,主题公园POI,宾馆POI,百货店POI,便利店POI,书店POI,快餐POI,咖啡馆POI,电影院POI,高尔夫poi,村庄点,市镇点,区县点,首都点', | |
| 39 | - srs: 'EPSG:4326', | ||
| 39 | + tilingScheme: 'EPSG:4326', | ||
| 40 | 40 | layerStyle: { | |
| 41 | 41 | zIndex: 1 | |
| 42 | 42 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,7 +26,7 @@ | |||
| 26 | 26 | <mapgis-3d-ogc-wmts-layer | |
| 27 | 27 | :base-url="baseUrl" | |
| 28 | 28 | :wmts-layer="wmtsLayer" | |
| 29 | - :srs="srs" | ||
| 29 | + :tiling-scheme="tilingScheme" | ||
| 30 | 30 | :tile-matrix-set="tileMatrixSet" | |
| 31 | 31 | :format="format" | |
| 32 | 32 | :layer-style="layerStyle" | |
@@ -44,7 +44,7 @@ | |||
| 44 | 44 | baseUrl: 'http://t6.tianditu.gov.cn/img_c/wmts?tk=9c157e9585486c02edf817d2ecbc7752', | |
| 45 | 45 | wmtsLayer: 'img', | |
| 46 | 46 | tileMatrixSet: 'c', | |
| 47 | - srs: 'EPSG:4326', | ||
| 47 | + tilingScheme: 'EPSG:4326', | ||
| 48 | 48 | format: 'tiles', | |
| 49 | 49 | layerStyle: { | |
| 50 | 50 | zIndex: 1 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,149 +1,148 @@ | |||
| 1 | 1 | <!DOCTYPE html> | |
| 2 | 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | |
| 3 | - <head> | ||
| 4 | - <meta charset="utf-8" /> | ||
| 5 | - <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" /> | ||
| 6 | - <title>Vue-GeoJSON</title> | ||
| 7 | - <script include="vue" exclude="plugin" src="./static/libs/include-mapboxgl-local.js"></script> | ||
| 8 | - <style type="text/css"> | ||
| 9 | - #main { | ||
| 10 | - margin: 0 0; | ||
| 11 | - width: 100%; | ||
| 12 | - height: 100vh; | ||
| 13 | - } | ||
| 14 | - #map { | ||
| 15 | - height: 100vh; | ||
| 16 | - width: 100%; | ||
| 17 | - } | ||
| 18 | - </style> | ||
| 19 | - </head> | ||
| 3 | + <head> | ||
| 4 | + <meta charset="utf-8" /> | ||
| 5 | + <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" /> | ||
| 6 | + <title>Vue-GeoJSON</title> | ||
| 7 | + <script include="vue" exclude="plugin" src="./static/libs/include-mapboxgl-local.js"></script> | ||
| 8 | + <style type="text/css"> | ||
| 9 | + #main { | ||
| 10 | + margin: 0 0; | ||
| 11 | + width: 100%; | ||
| 12 | + height: 100vh; | ||
| 13 | + } | ||
| 14 | + #map { | ||
| 15 | + height: 100vh; | ||
| 16 | + width: 100%; | ||
| 17 | + } | ||
| 18 | + </style> | ||
| 19 | + </head> | ||
| 20 | 20 | ||
| 21 | - <body> | ||
| 22 | - <div id="app"> | ||
| 23 | - <mapgis-web-map | ||
| 24 | - id="map" | ||
| 25 | - :map-style="mapStyle" | ||
| 26 | - :zoom="mapZoom" | ||
| 27 | - :center="outerCenter" | ||
| 28 | - :crs="mapCrs" | ||
| 29 | - v-on:load="handleMapLoad"> | ||
| 30 | - <mapgis-ogc-wmts-layer | ||
| 31 | - :layer-id="layerWmtsId" | ||
| 32 | - :source-id="sourceWmtsId" | ||
| 33 | - :base-url="wmtsurl" | ||
| 34 | - :tile-matrix-set="tileMatrixSet" | ||
| 35 | - :wmts-layer="layer" | ||
| 36 | - :format="format" | ||
| 37 | - :token="token"> | ||
| 38 | - </mapgis-ogc-wmts-layer> | ||
| 39 | - <canvas id="canvasID" width="400" height="400">Canvas not supported</canvas> | ||
| 40 | - <mapgis-canvas-layer | ||
| 41 | - :source-id="canvasSourceId" | ||
| 42 | - :source="canvasSource" | ||
| 43 | - :layer-id="canvasLayerId" | ||
| 44 | - :layer="canvasLayer" | ||
| 45 | - v-on:layer-source-loading="handCanvasLoad"> | ||
| 46 | - </mapgis-canvas-layer> | ||
| 47 | - </mapgis-web-map> | ||
| 48 | - </div> | ||
| 49 | - <script> | ||
| 50 | - new Vue({ | ||
| 51 | - el: '#app', | ||
| 52 | - data() { | ||
| 53 | - return { | ||
| 54 | - mapStyle: { | ||
| 55 | - version: 8, | ||
| 56 | - sources: {}, | ||
| 57 | - layers: [] | ||
| 58 | - }, | ||
| 59 | - mapZoom: 5, | ||
| 60 | - outerCenter: [116.3, 40.5], | ||
| 61 | - mapCrs: 'EPSG:4326', | ||
| 21 | + <body> | ||
| 22 | + <div id="app"> | ||
| 23 | + <mapgis-web-map id="map" :map-style="mapStyle" :zoom="mapZoom" :center="outerCenter" :crs="mapCrs" v-on:load="handleMapLoad"> | ||
| 24 | + <mapgis-ogc-wmts-layer | ||
| 25 | + :layer-id="layerWmtsId" | ||
| 26 | + :source-id="sourceWmtsId" | ||
| 27 | + :base-url="wmtsurl" | ||
| 28 | + :tile-matrix-set="tileMatrixSet" | ||
| 29 | + :wmts-layer="layer" | ||
| 30 | + :format="format" | ||
| 31 | + :token="token" | ||
| 32 | + > | ||
| 33 | + </mapgis-ogc-wmts-layer> | ||
| 34 | + <canvas id="canvasID" width="400" height="400">Canvas not supported</canvas> | ||
| 35 | + <mapgis-canvas-layer | ||
| 36 | + :source-id="canvasSourceId" | ||
| 37 | + :source="canvasSource" | ||
| 38 | + :layer-id="canvasLayerId" | ||
| 39 | + :layer="canvasLayer" | ||
| 40 | + v-on:layer-source-loading="handCanvasLoad" | ||
| 41 | + > | ||
| 42 | + </mapgis-canvas-layer> | ||
| 43 | + </mapgis-web-map> | ||
| 44 | + </div> | ||
| 45 | + <script> | ||
| 46 | + new Vue({ | ||
| 47 | + el: '#app', | ||
| 48 | + data() { | ||
| 49 | + return { | ||
| 50 | + mapStyle: { | ||
| 51 | + version: 8, | ||
| 52 | + sources: {}, | ||
| 53 | + layers: [] | ||
| 54 | + }, | ||
| 55 | + mapZoom: 5, | ||
| 56 | + outerCenter: [116.3, 40.5], | ||
| 57 | + mapCrs: 'EPSG:4326', | ||
| 62 | 58 | ||
| 63 | - layerWmtsId: 'ogcwmts_layerId', | ||
| 64 | - sourceWmtsId: 'ogcwmts_sourceId', | ||
| 65 | - wmtsurl: 'http://t0.tianditu.com/vec_c/wmts', | ||
| 66 | - layer:"vec", | ||
| 67 | - tileMatrixSet:"c", | ||
| 68 | - format:"tiles", | ||
| 69 | - token:"f5347cab4b28410a6e8ba5143e3d5a35", | ||
| 59 | + layerWmtsId: 'ogcwmts_layerId', | ||
| 60 | + sourceWmtsId: 'ogcwmts_sourceId', | ||
| 61 | + wmtsurl: 'http://t0.tianditu.com/vec_c/wmts', | ||
| 62 | + layer: 'vec', | ||
| 63 | + tileMatrixSet: 'c', | ||
| 64 | + format: 'tiles', | ||
| 65 | + token: { | ||
| 66 | + key: 'tk', | ||
| 67 | + value: 'f5347cab4b28410a6e8ba5143e3d5a35' | ||
| 68 | + }, | ||
| 70 | 69 | ||
| 71 | - canvasSourceId: 'canvassourceid', | ||
| 72 | - canvasSource: { | ||
| 73 | - type: 'canvas', | ||
| 74 | - canvas: 'canvasID', | ||
| 75 | - coordinates: [ | ||
| 76 | - [108.7381, 45.6339], | ||
| 77 | - [126.0011, 45.6339], | ||
| 78 | - [126.0011, 34.2583], | ||
| 79 | - [108.7381, 34.2583] | ||
| 80 | - ], | ||
| 81 | - animate: true | ||
| 82 | - }, | ||
| 83 | - canvasLayerId: 'canvaslayerid', | ||
| 84 | - canvasLayer: { | ||
| 85 | - source: 'canvassourceid', | ||
| 86 | - type: 'raster' | ||
| 87 | - } | ||
| 88 | - }; | ||
| 89 | - }, | ||
| 90 | - methods: { | ||
| 91 | - handleMapLoad(payload) { | ||
| 92 | - this.map = payload.map; | ||
| 93 | - }, | ||
| 94 | - handCanvasLoad() { | ||
| 95 | - console.log('load'); | ||
| 96 | - this.initCanvas(); | ||
| 97 | - }, | ||
| 98 | - initCanvas() { | ||
| 99 | - var canvas = document.getElementById('canvasID'); | ||
| 100 | - var ctx = canvas.getContext('2d'); | ||
| 101 | - var circles = []; | ||
| 102 | - var radius = 20; | ||
| 70 | + canvasSourceId: 'canvassourceid', | ||
| 71 | + canvasSource: { | ||
| 72 | + type: 'canvas', | ||
| 73 | + canvas: 'canvasID', | ||
| 74 | + coordinates: [ | ||
| 75 | + [108.7381, 45.6339], | ||
| 76 | + [126.0011, 45.6339], | ||
| 77 | + [126.0011, 34.2583], | ||
| 78 | + [108.7381, 34.2583] | ||
| 79 | + ], | ||
| 80 | + animate: true | ||
| 81 | + }, | ||
| 82 | + canvasLayerId: 'canvaslayerid', | ||
| 83 | + canvasLayer: { | ||
| 84 | + source: 'canvassourceid', | ||
| 85 | + type: 'raster' | ||
| 86 | + } | ||
| 87 | + }; | ||
| 88 | + }, | ||
| 89 | + methods: { | ||
| 90 | + handleMapLoad(payload) { | ||
| 91 | + this.map = payload.map; | ||
| 92 | + }, | ||
| 93 | + handCanvasLoad() { | ||
| 94 | + console.log('load'); | ||
| 95 | + this.initCanvas(); | ||
| 96 | + }, | ||
| 97 | + initCanvas() { | ||
| 98 | + var canvas = document.getElementById('canvasID'); | ||
| 99 | + var ctx = canvas.getContext('2d'); | ||
| 100 | + var circles = []; | ||
| 101 | + var radius = 20; | ||
| 103 | 102 | ||
| 104 | - function Circle(x, y, dx, dy, radius, color) { | ||
| 105 | - this.x = x; | ||
| 106 | - this.y = y; | ||
| 107 | - this.dx = dx; | ||
| 108 | - this.dy = dy; | ||
| 109 | - this.radius = radius; | ||
| 110 | - this.draw = function () { | ||
| 111 | - ctx.beginPath(); | ||
| 112 | - ctx.arc(this.x, this.y, this.radius, 0, Math.PI * 2, false); | ||
| 113 | - ctx.strokeStyle = color; | ||
| 114 | - ctx.stroke(); | ||
| 115 | - }; | ||
| 116 | - this.update = function () { | ||
| 117 | - if (this.x + this.radius > 400 || this.x - this.radius < 0) { | ||
| 118 | - this.dx = -this.dx; | ||
| 119 | - } | ||
| 120 | - if (this.y + this.radius > 400 || this.y - this.radius < 0) { | ||
| 121 | - this.dy = -this.dy; | ||
| 122 | - } | ||
| 123 | - this.x += this.dx; | ||
| 124 | - this.y += this.dy; | ||
| 125 | - this.draw(); | ||
| 126 | - }; | ||
| 127 | - } | ||
| 128 | - for (var i = 0; i < 25; i++) { | ||
| 129 | - var color = '#' + (0x1000000 + Math.random() * 0xffffff).toString(16).substr(1, 6); | ||
| 130 | - var x = Math.random() * (400 - radius * 2) + radius; | ||
| 131 | - var y = Math.random() * (400 - radius * 2) + radius; | ||
| 132 | - var dx = (Math.random() - 0.5) * 2; | ||
| 133 | - var dy = (Math.random() - 0.5) * 2; | ||
| 134 | - circles.push(new Circle(x, y, dx, dy, radius, color)); | ||
| 135 | - } | ||
| 136 | - function animate() { | ||
| 137 | - requestAnimationFrame(animate); | ||
| 138 | - ctx.clearRect(0, 0, 400, 400); | ||
| 139 | - for (var r = 0; r < 25; r++) { | ||
| 140 | - circles[r].update(); | ||
| 141 | - } | ||
| 142 | - } | ||
| 143 | - animate(); | ||
| 144 | - } | ||
| 145 | - } | ||
| 146 | - }); | ||
| 147 | - </script> | ||
| 148 | - </body> | ||
| 103 | + function Circle(x, y, dx, dy, radius, color) { | ||
| 104 | + this.x = x; | ||
| 105 | + this.y = y; | ||
| 106 | + this.dx = dx; | ||
| 107 | + this.dy = dy; | ||
| 108 | + this.radius = radius; | ||
| 109 | + this.draw = function () { | ||
| 110 | + ctx.beginPath(); | ||
| 111 | + ctx.arc(this.x, this.y, this.radius, 0, Math.PI * 2, false); | ||
| 112 | + ctx.strokeStyle = color; | ||
| 113 | + ctx.stroke(); | ||
| 114 | + }; | ||
| 115 | + this.update = function () { | ||
| 116 | + if (this.x + this.radius > 400 || this.x - this.radius < 0) { | ||
| 117 | + this.dx = -this.dx; | ||
| 118 | + } | ||
| 119 | + if (this.y + this.radius > 400 || this.y - this.radius < 0) { | ||
| 120 | + this.dy = -this.dy; | ||
| 121 | + } | ||
| 122 | + this.x += this.dx; | ||
| 123 | + this.y += this.dy; | ||
| 124 | + this.draw(); | ||
| 125 | + }; | ||
| 126 | + } | ||
| 127 | + for (var i = 0; i < 25; i++) { | ||
| 128 | + var color = '#' + (0x1000000 + Math.random() * 0xffffff).toString(16).substr(1, 6); | ||
| 129 | + var x = Math.random() * (400 - radius * 2) + radius; | ||
| 130 | + var y = Math.random() * (400 - radius * 2) + radius; | ||
| 131 | + var dx = (Math.random() - 0.5) * 2; | ||
| 132 | + var dy = (Math.random() - 0.5) * 2; | ||
| 133 | + circles.push(new Circle(x, y, dx, dy, radius, color)); | ||
| 134 | + } | ||
| 135 | + function animate() { | ||
| 136 | + requestAnimationFrame(animate); | ||
| 137 | + ctx.clearRect(0, 0, 400, 400); | ||
| 138 | + for (var r = 0; r < 25; r++) { | ||
| 139 | + circles[r].update(); | ||
| 140 | + } | ||
| 141 | + } | ||
| 142 | + animate(); | ||
| 143 | + } | ||
| 144 | + } | ||
| 145 | + }); | ||
| 146 | + </script> | ||
| 147 | + </body> | ||
| 149 | 148 | </html> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -102,7 +102,10 @@ | |||
| 102 | 102 | layer:"img", | |
| 103 | 103 | tileMatrixSet:"c", | |
| 104 | 104 | format:"tiles", | |
| 105 | - token:"f5347cab4b28410a6e8ba5143e3d5a35", | ||
| 105 | + token: { | ||
| 106 | + key: 'tk', | ||
| 107 | + value: 'f5347cab4b28410a6e8ba5143e3d5a35' | ||
| 108 | + }, | ||
| 106 | 109 | ||
| 107 | 110 | sourceVectorId: 'vector_source_id', | |
| 108 | 111 | layerVectorId: 'vector_layer_id', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -184,7 +184,10 @@ | |||
| 184 | 184 | layer:"img", | |
| 185 | 185 | tileMatrixSet:"c", | |
| 186 | 186 | format:"tiles", | |
| 187 | - token:"f5347cab4b28410a6e8ba5143e3d5a35", | ||
| 187 | + token: { | ||
| 188 | + key: 'tk', | ||
| 189 | + value: 'f5347cab4b28410a6e8ba5143e3d5a35' | ||
| 190 | + }, | ||
| 188 | 191 | ||
| 189 | 192 | sourceVectorId: 'vector_source_id', | |
| 190 | 193 | layerVectorId: 'vector_layer_id', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -177,7 +177,10 @@ | |||
| 177 | 177 | layer:"img", | |
| 178 | 178 | tileMatrixSet:"c", | |
| 179 | 179 | format:"tiles", | |
| 180 | - token:"f5347cab4b28410a6e8ba5143e3d5a35", | ||
| 180 | + token: { | ||
| 181 | + key: 'tk', | ||
| 182 | + value: 'f5347cab4b28410a6e8ba5143e3d5a35' | ||
| 183 | + }, | ||
| 181 | 184 | ||
| 182 | 185 | sourceVectorId: 'vector_source_id', | |
| 183 | 186 | layerVectorId: 'vector_layer_id', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -79,7 +79,10 @@ | |||
| 79 | 79 | layer:"img", | |
| 80 | 80 | tileMatrixSet:"c", | |
| 81 | 81 | format:"tiles", | |
| 82 | - token:"f5347cab4b28410a6e8ba5143e3d5a35", | ||
| 82 | + token: { | ||
| 83 | + key: 'tk', | ||
| 84 | + value: 'f5347cab4b28410a6e8ba5143e3d5a35' | ||
| 85 | + }, | ||
| 83 | 86 | ||
| 84 | 87 | geojsonSourceId: "geojsonCollections", | |
| 85 | 88 | geojsonSource: { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments