]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/browse.js
Add option to include marker in permalinks
[rails.git] / app / assets / javascripts / index / browse.js
index 49090f69cfe1a3a0b3742867d2bdb4d224e3cdca..a9bdbf2b7fac290dd561b9ac1e31b8396d8763ee 100644 (file)
@@ -2,7 +2,7 @@
 //= require templates/browse/feature_list
 //= require templates/browse/feature_history
 
-function initializeBrowse(map) {
+function initializeBrowse(map, params) {
   var browseBounds;
   var layersById;
   var selectedLayer;
@@ -49,6 +49,12 @@ function initializeBrowse(map) {
     }
   });
 
+  if (OSM.STATUS != 'api_offline' && OSM.STATUS != 'database_offline') {
+    if (params.layers.indexOf(dataLayer.options.code) >= 0) {
+      map.addLayer(dataLayer);
+    }
+  }
+
   function startBrowse(sidebarHtml) {
     locationFilter = new L.LocationFilter({
       enableButton: false,