- $("#sidebar").one("closed", function () {
- map.removeLayer(locationFilter);
- map.off("moveend", update);
- locationFilter.off("change", update);
- });
+ function setBounds(bounds) {
+ var precision = OSM.zoomPrecision(map.getZoom());
+ $("#minlon").val(bounds.getWest().toFixed(precision));
+ $("#minlat").val(bounds.getSouth().toFixed(precision));
+ $("#maxlon").val(bounds.getEast().toFixed(precision));
+ $("#maxlat").val(bounds.getNorth().toFixed(precision));
+
+ $("#export_overpass").attr("href",
+ "https://overpass-api.de/api/map?bbox=" +
+ $("#minlon").val() + "," + $("#minlat").val() + "," +
+ $("#maxlon").val() + "," + $("#maxlat").val());
+ }