Skip to content

Commit 8096f5c

Browse files
committed
【examples】修复示例
1 parent 9dc5a5e commit 8096f5c

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

examples/mapboxgl/01_tiledMapLayer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

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

examples/openlayers/WMSLayer.html

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,14 @@
1212
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
1313
<div id="map" style="width: 100%;height:100%"></div>
1414
<script type="text/javascript">
15-
var resolutions = new Array(17);
16-
var matrixIds = new Array(17);
17-
for (var z = 0; z < 17; ++z) {
18-
resolutions[z] = 156543.033928041 / Math.pow(2, z);
19-
matrixIds[z] = z;
20-
}
2115
var map = new ol.Map({
2216
target: 'map',
2317
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
2418
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
2519
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
2620
view: new ol.View({
27-
center: [0, 0],
28-
zoom: 0,
21+
center: [12782862.935188107, 4544498.746315297],
22+
zoom: 5,
2923
multiWorld: true
3024
}),
3125
layers: [new ol.layer.Tile({

examples/openlayers/WMTSLayer.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
2525
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
2626
view: new ol.View({
27-
center: [0, 0],
28-
zoom: 0,
27+
center: [12782862.935188107, 4544498.746315297],
28+
zoom: 5,
2929
multiWorld: true
3030
}),
3131
layers: [new ol.layer.Tile({

0 commit comments

Comments
 (0)