Skip to content

Commit b1194c8

Browse files
fix icl-1463 图层切换控件实例可能取不到国际化对象 review by luox
1 parent 0d4abb2 commit b1194c8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/leaflet/controler_layerswitcher.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
1919
<script type="text/javascript">
2020
var host = window.isLocal ? window.server : "https://iserver.supermap.io";
21-
22-
var BJ = L.marker([39.830660058696104, 116.92866163503169]).bindPopup(resources.text_beijingCity),
23-
CD = L.marker([30.40, 104.04]).bindPopup(resources.text_chengdu);
21+
var BJ = L.marker([39.830660058696104, 116.92866163503169]).bindPopup(resources ? resources.text_beijingCity : '北京市'),
22+
CD = L.marker([30.40, 104.04]).bindPopup(resources ? resources.text_chengdu : '成都市');
2423
var cities = L.layerGroup([BJ, CD]);
2524
var China = new L.supermap.TiledMapLayer(host + '/iserver/services/map-china400/rest/maps/China', {noWrap: true});
2625
var ChinaDark = new L.supermap.TiledMapLayer(host + '/iserver/services/map-china400/rest/maps/ChinaDark', {noWrap: true});

0 commit comments

Comments
 (0)