Skip to content

Commit aeb0f3c

Browse files
author
潘卓然ParnDeedlit
committed
【站点】【修复】【统改srs为tilingschame参数】
1 parent 56d6756 commit aeb0f3c

File tree

24 files changed

+227
-166
lines changed

24 files changed

+227
-166
lines changed

website/public/static/demo/vue-cesium/example/layer/image/arcgisTile.htm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
>
3030
<mapgis-3d-arcgis-tile-layer
3131
:base-url="tileurl"
32+
:tiling-scheme="tilingScheme"
3233
:layer-style="layerStyle">
3334
</mapgis-3d-arcgis-tile-layer>
3435
</mapgis-web-scene>
@@ -38,6 +39,7 @@
3839
el: '#app',
3940
data() {
4041
return {
42+
tilingScheme:"EPSG:3857",
4143
tileurl:"http://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer",
4244
layerStyle: {
4345
visible: true,

website/public/static/demo/vue-cesium/example/layer/image/wms.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<mapgis-3d-ogc-wms-layer
2626
:base-url="baseUrl"
2727
:layers="layers"
28-
:srs="srs"
28+
:tiling-scheme="tilingScheme"
2929
:layer-style="layerStyle"></mapgis-3d-ogc-wms-layer>
3030
</mapgis-web-scene>
3131
</div>
@@ -36,7 +36,7 @@
3636
return {
3737
baseUrl: 'http://develop.smaryun.com:6163/igs/rest/ogc/doc/北京市/WMSServer',
3838
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',
4040
layerStyle: {
4141
zIndex: 1
4242
}

website/public/static/demo/vue-cesium/example/layer/terrain/dem.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<mapgis-3d-ogc-wmts-layer
2727
:base-url="baseUrl"
2828
:wmts-layer="wmtsLayer"
29-
:srs="srs"
29+
:tiling-scheme="tilingScheme"
3030
:tile-matrix-set="tileMatrixSet"
3131
:format="format"
3232
:layer-style="layerStyle"
@@ -44,7 +44,7 @@
4444
baseUrl: 'http://t6.tianditu.gov.cn/img_c/wmts?tk=9c157e9585486c02edf817d2ecbc7752',
4545
wmtsLayer: 'img',
4646
tileMatrixSet: 'c',
47-
srs: 'EPSG:4326',
47+
tilingScheme: 'EPSG:4326',
4848
format: 'tiles',
4949
layerStyle: {
5050
zIndex: 1
Lines changed: 141 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -1,149 +1,148 @@
11
<!DOCTYPE html>
22
<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>
2020

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',
6258

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+
},
7069

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;
103102

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>
149148
</html>

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@
102102
layer:"img",
103103
tileMatrixSet:"c",
104104
format:"tiles",
105-
token:"f5347cab4b28410a6e8ba5143e3d5a35",
105+
token: {
106+
key: 'tk',
107+
value: 'f5347cab4b28410a6e8ba5143e3d5a35'
108+
},
106109

107110
sourceVectorId: 'vector_source_id',
108111
layerVectorId: 'vector_layer_id',

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,10 @@
184184
layer:"img",
185185
tileMatrixSet:"c",
186186
format:"tiles",
187-
token:"f5347cab4b28410a6e8ba5143e3d5a35",
187+
token: {
188+
key: 'tk',
189+
value: 'f5347cab4b28410a6e8ba5143e3d5a35'
190+
},
188191

189192
sourceVectorId: 'vector_source_id',
190193
layerVectorId: 'vector_layer_id',

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,10 @@
177177
layer:"img",
178178
tileMatrixSet:"c",
179179
format:"tiles",
180-
token:"f5347cab4b28410a6e8ba5143e3d5a35",
180+
token: {
181+
key: 'tk',
182+
value: 'f5347cab4b28410a6e8ba5143e3d5a35'
183+
},
181184

182185
sourceVectorId: 'vector_source_id',
183186
layerVectorId: 'vector_layer_id',

website/public/static/demo/vue-mapboxgl/example/layer/generalLayer/geojsonlayer.htm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@
7979
layer:"img",
8080
tileMatrixSet:"c",
8181
format:"tiles",
82-
token:"f5347cab4b28410a6e8ba5143e3d5a35",
82+
token: {
83+
key: 'tk',
84+
value: 'f5347cab4b28410a6e8ba5143e3d5a35'
85+
},
8386

8487
geojsonSourceId: "geojsonCollections",
8588
geojsonSource: {

0 commit comments

Comments
 (0)