Skip to content

Commit 97e89b9

Browse files
【vue-mapboxgl】【vue-vector】【修改wmts --baseUrl】
1 parent a816b14 commit 97e89b9

File tree

5 files changed

+105
-27
lines changed

5 files changed

+105
-27
lines changed

website/public/static/demo/vue-mapboxgl/example/vue-vector/circle.htm

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,32 @@
2323
<div id="app">
2424
<mapgis-web-map
2525
id="map"
26-
:access-token="accessToken"
2726
:map-style="mapStyle"
2827
:zoom="mapZoom"
2928
:center="outerCenter"
3029
:crs="mapCrs"
3130
v-on:load="handleMapLoad"
3231
>
33-
<mapgis-ogc-wmts-layer :layer="layerWmts" :layer-id="layerWmtsId" :source-id="sourceWmtsId" :url="wmtsurl"> </mapgis-ogc-wmts-layer>
34-
<mapgis-vector-layer :layer="layerVector" :layer-id="layerVectorId" :source="sourceVector" :source-id="sourceVectorId">
32+
<mapgis-ogc-wmts-layer
33+
:layer-id="layerWmtsId"
34+
:source-id="sourceWmtsId"
35+
:base-url="wmtsurl"
36+
:tile-matrix-set="tileMatrixSet"
37+
:wmts-layer="layer"
38+
:format="format"
39+
:token="token">
40+
</mapgis-ogc-wmts-layer>
41+
<mapgis-vector-layer
42+
:layer="layerVector"
43+
:layer-id="layerVectorId"
44+
:source="sourceVector"
45+
:source-id="sourceVectorId">
3546
</mapgis-vector-layer>
36-
<mapgis-vector-layer :layer="layerSymbol" :layer-id="layerSymbolId" :source="sourceSymbol" :source-id="sourceSymbolId">
47+
<mapgis-vector-layer
48+
:layer="layerSymbol"
49+
:layer-id="layerSymbolId"
50+
:source="sourceSymbol"
51+
:source-id="sourceSymbolId">
3752
</mapgis-vector-layer>
3853
</mapgis-web-map>
3954
</div>
@@ -81,10 +96,13 @@
8196
outerCenter: [114.39960479736327, 30.495722001885323], // 地图显示中心
8297
mapCrs: 'EPSG:4326',
8398

84-
layerWmts: {},
8599
layerWmtsId: 'ogcwmts_layer_id',
86100
sourceWmtsId: 'ogcwmts_source_id',
87-
wmtsurl: 'http://t0.tianditu.com/DataServer?T=img_c&L={z}&Y={y}&X={x}&tk=9c157e9585486c02edf817d2ecbc7752',
101+
wmtsurl: 'http://t0.tianditu.gov.cn/img_c/wmts',
102+
layer:"img",
103+
tileMatrixSet:"c",
104+
format:"tiles",
105+
token:"f5347cab4b28410a6e8ba5143e3d5a35",
88106

89107
sourceVectorId: 'vector_source_id',
90108
layerVectorId: 'vector_layer_id',

website/public/static/demo/vue-mapboxgl/example/vue-vector/fill-extrusion.htm

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
<div id="app">
2424
<mapgis-web-map
2525
id="map"
26-
:access-token="accessToken"
2726
:map-style="mapStyle"
2827
:zoom="mapZoom"
2928
:pitch="45"
@@ -32,8 +31,20 @@
3231
:crs="mapCrs"
3332
v-on:load="handleMapLoad"
3433
>
35-
<mapgis-ogc-wmts-layer :layer="layerWmts" :layer-id="layerWmtsId" :source-id="sourceWmtsId" :url="wmtsurl"> </mapgis-ogc-wmts-layer>
36-
<mapgis-vector-layer :layer="layerVector" :layer-id="layerVectorId" :source="sourceVector" :source-id="sourceVectorId">
34+
<mapgis-ogc-wmts-layer
35+
:layer-id="layerWmtsId"
36+
:source-id="sourceWmtsId"
37+
:base-url="wmtsurl"
38+
:tile-matrix-set="tileMatrixSet"
39+
:wmts-layer="layer"
40+
:format="format"
41+
:token="token">
42+
</mapgis-ogc-wmts-layer>
43+
<mapgis-vector-layer
44+
:layer="layerVector"
45+
:layer-id="layerVectorId"
46+
:source="sourceVector"
47+
:source-id="sourceVectorId">
3748
</mapgis-vector-layer>
3849
</mapgis-web-map>
3950
</div>
@@ -167,10 +178,13 @@
167178
outerCenter: [114.39958333969115, 30.467706575758285], // 地图显示中心
168179
mapCrs: 'EPSG:4326',
169180

170-
layerWmts: {},
171181
layerWmtsId: 'ogcwmts_layer_id',
172182
sourceWmtsId: 'ogcwmts_source_id',
173-
wmtsurl: 'http://t0.tianditu.com/DataServer?T=img_c&L={z}&Y={y}&X={x}&tk=9c157e9585486c02edf817d2ecbc7752',
183+
wmtsurl: 'http://t0.tianditu.gov.cn/img_c/wmts',
184+
layer:"img",
185+
tileMatrixSet:"c",
186+
format:"tiles",
187+
token:"f5347cab4b28410a6e8ba5143e3d5a35",
174188

175189
sourceVectorId: 'vector_source_id',
176190
layerVectorId: 'vector_layer_id',

website/public/static/demo/vue-mapboxgl/example/vue-vector/fill.htm

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,26 @@
2323
<div id="app">
2424
<mapgis-web-map
2525
id="map"
26-
:access-token="accessToken"
2726
:map-style="mapStyle"
2827
:zoom="mapZoom"
2928
:center="outerCenter"
3029
:crs="mapCrs"
3130
v-on:load="handleMapLoad"
3231
>
33-
<mapgis-ogc-wmts-layer :layer="layerWmts" :layer-id="layerWmtsId" :source-id="sourceWmtsId" :url="wmtsurl"> </mapgis-ogc-wmts-layer>
34-
<mapgis-vector-layer :layer="layerVector" :layer-id="layerVectorId" :source="sourceVector" :source-id="sourceVectorId">
32+
<mapgis-ogc-wmts-layer
33+
:layer-id="layerWmtsId"
34+
:source-id="sourceWmtsId"
35+
:base-url="wmtsurl"
36+
:tile-matrix-set="tileMatrixSet"
37+
:wmts-layer="layer"
38+
:format="format"
39+
:token="token">
40+
</mapgis-ogc-wmts-layer>
41+
<mapgis-vector-layer
42+
:layer="layerVector"
43+
:layer-id="layerVectorId"
44+
:source="sourceVector"
45+
:source-id="sourceVectorId">
3546
</mapgis-vector-layer>
3647
</mapgis-web-map>
3748
</div>
@@ -160,10 +171,13 @@
160171
outerCenter: [114.39958333969115, 30.467706575758285], // 地图显示中心
161172
mapCrs: 'EPSG:4326',
162173

163-
layerWmts: {},
164174
layerWmtsId: 'ogcwmts_layer_id',
165175
sourceWmtsId: 'ogcwmts_source_id',
166-
wmtsurl: 'http://t0.tianditu.com/DataServer?T=img_c&L={z}&Y={y}&X={x}&tk=9c157e9585486c02edf817d2ecbc7752',
176+
wmtsurl: 'http://t0.tianditu.gov.cn/img_c/wmts',
177+
layer:"img",
178+
tileMatrixSet:"c",
179+
format:"tiles",
180+
token:"f5347cab4b28410a6e8ba5143e3d5a35",
167181

168182
sourceVectorId: 'vector_source_id',
169183
layerVectorId: 'vector_layer_id',

website/public/static/demo/vue-mapboxgl/example/vue-vector/line.htm

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,26 @@
2323
<div id="app">
2424
<mapgis-web-map
2525
id="map"
26-
:access-token="accessToken"
2726
:map-style="mapStyle"
2827
:zoom="mapZoom"
2928
:center="outerCenter"
3029
:crs="mapCrs"
3130
v-on:load="handleMapLoad"
3231
>
33-
<mapgis-ogc-wmts-layer :layer="layerWmts" :layer-id="layerWmtsId" :source-id="sourceWmtsId" :url="wmtsurl"> </mapgis-ogc-wmts-layer>
34-
<mapgis-vector-layer :layer="layerVector" :layer-id="layerVectorId" :source="sourceVector" :source-id="sourceVectorId">
32+
<mapgis-ogc-wmts-layer
33+
:layer-id="layerWmtsId"
34+
:source-id="sourceWmtsId"
35+
:base-url="wmtsurl"
36+
:tile-matrix-set="tileMatrixSet"
37+
:wmts-layer="layer"
38+
:format="format"
39+
:token="token">
40+
</mapgis-ogc-wmts-layer>
41+
<mapgis-vector-layer
42+
:layer="layerVector"
43+
:layer-id="layerVectorId"
44+
:source="sourceVector"
45+
:source-id="sourceVectorId">
3546
</mapgis-vector-layer>
3647
</mapgis-web-map>
3748
</div>
@@ -117,10 +128,13 @@
117128
outerCenter: [114.39960479736327, 30.495722001885323], // 地图显示中心
118129
mapCrs: 'EPSG:4326',
119130

120-
layerWmts: {},
121131
layerWmtsId: 'ogcwmts_layer_id',
122132
sourceWmtsId: 'ogcwmts_source_id',
123-
wmtsurl: 'http://t0.tianditu.com/DataServer?T=img_c&L={z}&Y={y}&X={x}&tk=9c157e9585486c02edf817d2ecbc7752',
133+
wmtsurl: 'http://t0.tianditu.gov.cn/img_c/wmts',
134+
layer:"img",
135+
tileMatrixSet:"c",
136+
format:"tiles",
137+
token:"f5347cab4b28410a6e8ba5143e3d5a35",
124138

125139
sourceVectorId: 'vector_source_id',
126140
layerVectorId: 'vector_layer_id',

website/public/static/demo/vue-mapboxgl/example/vue-vector/symbol.htm

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,32 @@
2323
<div id="app">
2424
<mapgis-web-map
2525
id="map"
26-
:access-token="accessToken"
2726
:map-style="mapStyle"
2827
:zoom="mapZoom"
2928
:center="outerCenter"
3029
:crs="mapCrs"
3130
v-on:load="handleMapLoad"
3231
>
33-
<mapgis-ogc-wmts-layer :layer="layerWmts" :layer-id="layerWmtsId" :source-id="sourceWmtsId" :url="wmtsurl"> </mapgis-ogc-wmts-layer>
34-
<mapgis-vector-layer :layer="layerSymbol1" :layer-id="layerSymbolId1" :source="sourceSymbol1" :source-id="sourceSymbolId1">
32+
<mapgis-ogc-wmts-layer
33+
:layer-id="layerWmtsId"
34+
:source-id="sourceWmtsId"
35+
:base-url="wmtsurl"
36+
:tile-matrix-set="tileMatrixSet"
37+
:wmts-layer="layer"
38+
:format="format"
39+
:token="token">
40+
</mapgis-ogc-wmts-layer>
41+
<mapgis-vector-layer
42+
:layer="layerSymbol1"
43+
:layer-id="layerSymbolId1"
44+
:source="sourceSymbol1"
45+
:source-id="sourceSymbolId1">
3546
</mapgis-vector-layer>
36-
<mapgis-vector-layer :layer="layerSymbol2" :layer-id="layerSymbolId2" :source="sourceSymbol2" :source-id="sourceSymbolId2">
47+
<mapgis-vector-layer
48+
:layer="layerSymbol2"
49+
:layer-id="layerSymbolId2"
50+
:source="sourceSymbol2"
51+
:source-id="sourceSymbolId2">
3752
</mapgis-vector-layer>
3853
</mapgis-web-map>
3954
</div>
@@ -101,10 +116,13 @@
101116
outerCenter: [114.39958333969115, 30.467706575758285], // 地图显示中心
102117
mapCrs: 'EPSG:4326',
103118

104-
layerWmts: {},
105119
layerWmtsId: 'ogcwmts_layer_id',
106120
sourceWmtsId: 'ogcwmts_source_id',
107-
wmtsurl: 'http://t0.tianditu.com/DataServer?T=img_c&L={z}&Y={y}&X={x}&tk=9c157e9585486c02edf817d2ecbc7752',
121+
wmtsurl: 'http://t0.tianditu.gov.cn/img_c/wmts',
122+
layer:"img",
123+
tileMatrixSet:"c",
124+
format:"tiles",
125+
token:"f5347cab4b28410a6e8ba5143e3d5a35",
108126

109127
sourceSymbolId1: 'symbol_source_id_1',
110128
sourceSymbol1: {

0 commit comments

Comments
 (0)