]> git.openstreetmap.org Git - rails.git/blobdiff - public/javascripts/map.js
Don't show the marker layer in the layer switcher.
[rails.git] / public / javascripts / map.js
index 729cd78ff08486c912bf44d55895ebe38dd1fe2b..4a5cd844baf415bcefb9bdaab4b80b18debeb7cc 100644 (file)
@@ -17,7 +17,7 @@ function createMap(divName) {
 
    var numZoomLevels = Math.max(mapnik.numZoomLevels, osmarender.numZoomLevels);
    markers = new OpenLayers.Layer.Markers("Markers", { 
-      visibility: false, numZoomLevels: numZoomLevels,
+      displayInLayerSwitcher: false, numZoomLevels: numZoomLevels,
       maxExtent: new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508),
       maxResolution: 156543,
       units: "m",
@@ -43,7 +43,6 @@ function addMarkerToMap(position, icon, description) {
    var marker = new OpenLayers.Marker(position, icon);
 
    markers.addMarker(marker);
-   markers.setVisibility(true);
 
    if (description) {
       marker.events.register("click", marker, function() { openMapPopup(marker, description) });