try to add OpenLayers.js support for OpenStreetMap

svn: r17952
This commit is contained in:
Jérôme Rapinat 2011-07-24 12:54:58 +00:00
parent 5a6ddb8b60
commit 17a863b4cc

View File

@ -129,7 +129,7 @@ openstreet_jsc = """
function mapInit(){
map = createMap("map");
map.dataLayer = new OpenLayers.Layer("Data", { "visibility": false });
map.dataLayer = new OpenLayers.OSM(document.getElementById("map_canvas"), { "visibility": true });
map.dataLayer.events.register("visibilitychanged", map.dataLayer, toggleData);
map.addLayer(map.dataLayer);
@ -140,6 +140,11 @@ openstreet_jsc = """
updateLocation();
var markers = new OpenLayers.Layer.Markers("Markers");
map.addLayer(markers);
markers.addMarker(new OpenLayers.Marker(centre));
setMapLayers("M");
map.events.register("moveend", map, updateLocation);