X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/90621b4b4f2b48a1dddde89bbaf748c3776e2020..6dcd087abcf718fcaf9aca9283b6b39b9dbbcdcb:/app/assets/javascripts/index/browse.js diff --git a/app/assets/javascripts/index/browse.js b/app/assets/javascripts/index/browse.js index 07cff50f0..a9bdbf2b7 100644 --- a/app/assets/javascripts/index/browse.js +++ b/app/assets/javascripts/index/browse.js @@ -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, @@ -62,6 +68,8 @@ function initializeBrowse(map) { openSidebar(); + if (browseObjectList) loadObjectList(); + map.on("moveend", updateData); updateData();