Skip to content

Commit 5dcb407

Browse files
committed
【examples】修复示例
1 parent 8096f5c commit 5dcb407

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

examples/maplibregl/01_tiledMapLayer.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@
3232
" Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> ";
3333

3434
// 方式一:1.调用 maplibregl.supermap.initMap,根据 SuperMap iServer 地图服务的地图信息,创建地图和底图
35-
maplibregl.supermap.initMap(host + '/iserver/services/map-china/rest/maps/China').then(function (result) {
36-
var map = result.map;
37-
map.addControl(new maplibregl.NavigationControl(), 'top-left');
38-
})
35+
maplibregl.supermap.initMap(host + '/iserver/services/map-china/rest/maps/China', { mapOptions: { zoom: 4 } })
36+
.then(function (result) {
37+
var map = result.map;
38+
map.addControl(new maplibregl.NavigationControl(), 'top-left');
39+
})
3940

4041
// 方法二: 直接用 maplibregl.Map 初始化
4142
// var map = new maplibregl.Map({

0 commit comments

Comments
 (0)