]> git.openstreetmap.org Git - rails.git/blobdiff - public/javascripts/map.js
Only add the data layer to the main map, and use the visibility changed
[rails.git] / public / javascripts / map.js
index c7f381d846df32e1b68863968d4ea9b3d5c566b3..9b144c560a5093f6d0852137f7e948dc079dc991 100644 (file)
@@ -8,7 +8,8 @@ OpenLayers._getScriptLocation = function () {
 }
 
 function createMap(divName, options) {
-   if (!options) { options = {} }
+   options = options || {};
+
    map = new OpenLayers.Map(divName, {
       controls: options.controls || [
          new OpenLayers.Control.ArgParser(),
@@ -40,9 +41,6 @@ function createMap(divName, options) {
       wrapDateLine: true
    });
    map.addLayer(maplint);
-   var data = new OpenLayers.Layer.Data("Data", {'visibility': false});
-   map.addLayer(data); 
-   map.dataLayer = data;
 
    var numZoomLevels = Math.max(mapnik.numZoomLevels, osmarender.numZoomLevels);
    markers = new OpenLayers.Layer.Markers("Markers", {