Don't show the marker layer in the layer switcher.
authorTom Hughes <tom@compton.nu>
Sun, 30 Dec 2007 17:27:47 +0000 (17:27 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 30 Dec 2007 17:27:47 +0000 (17:27 +0000)
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) });