map.dataLayer = new L.OSM.DataLayer(null);
map.dataLayer.options.code = 'D';
+ if (OSM.STATUS != 'api_offline' && OSM.STATUS != 'database_offline') {
+ if (params.layers.indexOf(map.noteLayer.options.code) >= 0) {
+ map.addLayer(map.noteLayer);
+ }
+
+ if (params.layers.indexOf(map.dataLayer.options.code) >= 0) {
+ map.addLayer(map.dataLayer);
+ }
+ }
+
var position = $('html').attr('dir') === 'rtl' ? 'topleft' : 'topright';
L.OSM.zoom({position: position})
//= require templates/browse/feature_list
//= require templates/browse/feature_history
-function initializeBrowse(map, params) {
+function initializeBrowse(map) {
var browseBounds;
var layersById;
var selectedLayer;
}
});
- 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,
});
if (OSM.STATUS != 'api_offline' && OSM.STATUS != 'database_offline') {
- if (params.layers.indexOf(noteLayer.options.code) >= 0) {
- map.addLayer(noteLayer);
- }
-
if (params.note) {
$.ajax({
url: "/api/" + OSM.API_VERSION + "/notes/" + params.note + ".json",