Skip to content

Commit 87759f6

Browse files
committed
【fix】修复classic例子访问天地图失败的问题
1 parent 918445a commit 87759f6

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

examples/classic/map_3tianditu.html

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,26 @@
2121

2222
], allOverlays: true
2323
});
24-
tiandituLayer = new SuperMap.Layer.Tianditu();
25-
tianMarkerLayer = new SuperMap.Layer.Tianditu();
24+
tiandituLayer = new SuperMap.Layer.WMTS({
25+
name: "vec",
26+
url: "http://t0.tianditu.com/vec_c/wmts?tk=1d109683f4d84198e37a38c442d68311",
27+
layer: "vec",
28+
style: "default",
29+
matrixSet: "c",
30+
format: "tiles",
31+
opacity: 1,
32+
requestEncoding: "KVP"
33+
});
34+
tianMarkerLayer = new SuperMap.Layer.WMTS({
35+
name: "vec",
36+
url: "http://t0.tianditu.com/cva_c/wmts?tk=1d109683f4d84198e37a38c442d68311",
37+
layer: "cva",
38+
style: "default",
39+
matrixSet: "c",
40+
format: "tiles",
41+
opacity: 1,
42+
requestEncoding: "KVP"
43+
});
2644
tianMarkerLayer.layerType = "cva";
2745
tianMarkerLayer.isLabel = true;
2846
map.addControl(new SuperMap.Control.MousePosition());

0 commit comments

Comments
 (0)