Skip to content

Commit c7cb4fb

Browse files
committed
修改范例
1 parent 278ce10 commit c7cb4fb

File tree

8 files changed

+2364
-102
lines changed

8 files changed

+2364
-102
lines changed

examples/mapboxgl/01_tiledMapLayer.html

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<meta charset='utf-8'/>
55
<title></title>
66
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no'/>
7-
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.34.0/mapbox-gl.js'></script>
8-
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.34.0/mapbox-gl.css' rel='stylesheet'/>
7+
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.37.0/mapbox-gl.js'></script>
8+
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.37.0/mapbox-gl.css' rel='stylesheet'/>
99
<style>
1010
body {
1111
margin: 0;
@@ -46,23 +46,8 @@
4646
center: [120.143, 30.236], // starting position
4747
zoom: 3 // starting zoom
4848
});
49-
map.on('load', function () {
49+
map.addControl(new mapboxgl.NavigationControl());
5050

51-
map.addLayer({
52-
"id": "route",
53-
"type": "fill",
54-
"source": {
55-
"type": "geojson",
56-
"data": 'http://support.supermap.com.cn:8090/iserver/services/data-world/rest/data/datasources/World/datasets/Countries/features/247.geojson'
57-
58-
},
59-
'layout': {},
60-
'paint': {
61-
'fill-color': '#088',
62-
'fill-opacity': 0.8
63-
}
64-
});
65-
});
6651
</script>
6752

6853
</body>

examples/mapboxgl/config.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,21 @@ var exampleConfig = {
2626
name: "矢量瓦片",
2727
content: [
2828
{
29-
name: "MVT",
29+
name: "China-矢量瓦片",
3030
thumbnail: "mvtVectorTile.png",
3131
fileName: "mvtVectorTile"
32+
},
33+
{
34+
name: "北京",
35+
thumbnail: "mvt_Beijing.png",
36+
fileName: "mvtVectorTile_Beijing"
37+
},
38+
{
39+
name: "北京-暗夜风格",
40+
thumbnail: "mvt_Beijing_dark.png",
41+
fileName: "mvtVectorTile_Beijing_dark"
3242
}
43+
3344
]
3445
}
3546
}
21.9 KB
Loading
198 KB
Loading
99.7 KB
Loading

0 commit comments

Comments
 (0)