//= require templates/browse/feature_list
//= require templates/browse/feature_history
-function initializeBrowse(map) {
+function initializeBrowse(map, params) {
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,
openSidebar();
+ if (browseObjectList) loadObjectList();
+
map.on("moveend", updateData);
updateData();
$("#browse_content").append(div);
}
+ var dataLoader;
+
function getData() {
var bounds = locationFilter.isEnabled() ? locationFilter.getBounds() : map.getBounds();
var size = bounds.getSize();
}
@*/
- $.ajax({
+ if (dataLoader) dataLoader.abort();
+
+ dataLoader = $.ajax({
url: url,
success: function (xml) {
clearStatus();
} else {
displayFeatureWarning(features.length, maxFeatures, addFeatures);
}
+
+ dataLoader = null;
}
});
}