From c278b158e88d8bc24328a29323b47f2a3725c51e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Tue, 26 Jul 2011 08:44:22 +0000 Subject: [PATCH] make OpenStreetMap and Marker layers working together svn: r17968 --- src/plugins/lib/libhtmlconst.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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));