diff --git a/src/plugins/lib/libhtmlconst.py b/src/plugins/lib/libhtmlconst.py index ee27a9d04..d620f0ee8 100644 --- a/src/plugins/lib/libhtmlconst.py +++ b/src/plugins/lib/libhtmlconst.py @@ -125,7 +125,8 @@ OpenLayers.Lang.setCode("%s"); function initialize() { map = new OpenLayers.Map("map_canvas"); - map.addLayer(new OpenLayers.Layer.OSM()); + var osm = new OpenLayers.Layer.OSM() + map.addLayer(osm); var lonLat = new OpenLayers.LonLat(%s, %s) .transform( @@ -135,7 +136,6 @@ function initialize() { var zoom =16; map.setCenter(lonLat, zoom); - var osm = new OpenLayers.Layer.OSM("OpenStreetMap"); var markers = new OpenLayers.Layer.Markers( "Markers" ); markers.addMarker(new OpenLayers.Marker(lonLat));