make OpenStreetMap and Marker layers working together

svn: r17968
This commit is contained in:
Jérôme Rapinat 2011-07-26 08:44:22 +00:00
parent 249d4bd55b
commit c278b158e8

View File

@ -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));