make OpenStreetMap and Marker layers working together
svn: r17968
This commit is contained in:
parent
249d4bd55b
commit
c278b158e8
@ -125,7 +125,8 @@ OpenLayers.Lang.setCode("%s");
|
|||||||
|
|
||||||
function initialize() {
|
function initialize() {
|
||||||
map = new OpenLayers.Map("map_canvas");
|
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)
|
var lonLat = new OpenLayers.LonLat(%s, %s)
|
||||||
.transform(
|
.transform(
|
||||||
@ -135,7 +136,6 @@ function initialize() {
|
|||||||
var zoom =16;
|
var zoom =16;
|
||||||
map.setCenter(lonLat, zoom);
|
map.setCenter(lonLat, zoom);
|
||||||
|
|
||||||
var osm = new OpenLayers.Layer.OSM("OpenStreetMap");
|
|
||||||
var markers = new OpenLayers.Layer.Markers( "Markers" );
|
var markers = new OpenLayers.Layer.Markers( "Markers" );
|
||||||
markers.addMarker(new OpenLayers.Marker(lonLat));
|
markers.addMarker(new OpenLayers.Marker(lonLat));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user