var locationFilter = new L.LocationFilter({
enableButton: false,
- adjustButton: false,
+ adjustButton: false
}).addTo(map);
locationFilter.on("change", filterChanged);
openSidebar();
- if (map.hasLayer(layers[0].layer)) {
+ if (getMapBaseLayer().keyid == "mapnik") {
$("#format_mapnik").prop("checked", true);
}
var bounds = getBounds();
map.fitBounds(bounds);
-
- enableFilter();
locationFilter.setBounds(bounds);
+ enableFilter();
validateControls();
mapnikSizeChanged();
}
function enableFilter() {
+ if (!locationFilter.getBounds().isValid()) {
+ locationFilter.setBounds(map.getBounds().pad(-0.2));
+ }
+
$("#drag_box").hide();
locationFilter.enable();
}