Tidy up the stylesheets
[rails.git] / app / assets / javascripts / map.js.erb
index 4a2925c7bd8c48131ed41bf1f0d808a1a83fa60f..acfa108224abc8c827e7a78e0914ec1dc19f960e 100644 (file)
@@ -20,7 +20,8 @@ function createMap(divName, options) {
       units: "m",
       maxResolution: 156543.0339,
       numZoomLevels: 20,
-      displayProjection: new OpenLayers.Projection("EPSG:4326")
+      displayProjection: new OpenLayers.Projection("EPSG:4326"),
+      theme: "<%= asset_path 'theme/default/style.css' %>"
    });
 
    var mapnik = new OpenLayers.Layer.OSM.Mapnik(i18n("javascripts.map.base.mapnik"), {
@@ -268,7 +269,7 @@ function setMapLayers(layerConfig) {
                } else {
                   map.layers[i].setVisibility(true);
                }
-            } else {
+            } else if (!map.layers[i].isBaseLayer) {
                map.layers[i].setVisibility(false);
             }
          }