Skip to content

Commit 42236f6

Browse files
修改例子服务用法
1 parent 0ba75cb commit 42236f6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

examples/openlayers/01_tiledMapLayerNoProj.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@
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 url = 'https://iserver.supermap.io/iserver/services/map-changchun/rest/maps/长春市区图';
16-
// 方式一:1.调用 ol.supermap.initMap,根据 SuperMap iServer 地图服务的地图信息,创建地图和底图
15+
var map,
16+
url =
17+
(window.isLocal ? window.server : 'https://iserver.supermap.io') +
18+
'/iserver/services/map-changchun/rest/maps/长春市区图';
19+
// 方式一:1.调用 ol.supermap.initMap,根据 SuperMap iServer 地图服务的地图信息,创建地图和底图
1720
ol.supermap.initMap(url, {
1821
mapOptions: {
1922
controls: ol.control

0 commit comments

Comments
 (0)