]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/browse.js
Adding a little more max width for buttons
[rails.git] / app / assets / javascripts / index / browse.js
index e98e56b2797c0e468eb0a7ac4c646b8390e4dd6e..e04a864f468c74e1f5d7ce58e53022c4b91780e7 100644 (file)
@@ -10,20 +10,20 @@ function initializeBrowse(map) {
   var areasHidden = false;
   var locationFilter;
 
-  var dataLayer = new L.OSM.DataLayer(null, {
-    styles: {
-      way: {
-        weight: 3,
-        color: "#000000",
-        opacity: 0.4
-      },
-      area: {
-        weight: 3,
-        color: "#ff0000"
-      },
-      node: {
-        color: "#00ff00"
-      }
+  var dataLayer = map.dataLayer;
+
+  dataLayer.setStyle({
+    way: {
+      weight: 3,
+      color: "#000000",
+      opacity: 0.4
+    },
+    area: {
+      weight: 3,
+      color: "#ff0000"
+    },
+    node: {
+      color: "#00ff00"
     }
   });
 
@@ -35,10 +35,6 @@ function initializeBrowse(map) {
     onSelect(e.layer);
   });
 
-  if (OSM.STATUS != 'api_offline' && OSM.STATUS != 'database_offline') {
-//    map.layersControl.addOverlay(dataLayer, I18n.t("browse.start_rjs.data_layer_name"));
-  }
-
   map.on('layeradd', function (e) {
     if (e.layer === dataLayer) {
       $.ajax({ url: "/browse/start", success: function (sidebarHtml) {