Block submission of the export form when the area is too large
This commit is contained in:
parent
d79b286723
commit
b4a2b23025
1 changed files with 5 additions and 0 deletions
|
@ -53,6 +53,10 @@ OSM.Export = function(map) {
|
||||||
$("#export_commit").toggle(getBounds().getSize() < OSM.MAX_REQUEST_AREA);
|
$("#export_commit").toggle(getBounds().getSize() < OSM.MAX_REQUEST_AREA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function checkSubmit(e) {
|
||||||
|
if (getBounds().getSize() > OSM.MAX_REQUEST_AREA) e.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
page.pushstate = page.popstate = function(path) {
|
page.pushstate = page.popstate = function(path) {
|
||||||
$("#export_tab").addClass("current");
|
$("#export_tab").addClass("current");
|
||||||
OSM.loadSidebarContent(path, page.load);
|
OSM.loadSidebarContent(path, page.load);
|
||||||
|
@ -66,6 +70,7 @@ OSM.Export = function(map) {
|
||||||
$("#maxlat, #minlon, #maxlon, #minlat").change(boundsChanged);
|
$("#maxlat, #minlon, #maxlon, #minlat").change(boundsChanged);
|
||||||
$("#drag_box").click(enableFilter);
|
$("#drag_box").click(enableFilter);
|
||||||
$("#sidebar_content .close").on("click", page.minimizeSidebar);
|
$("#sidebar_content .close").on("click", page.minimizeSidebar);
|
||||||
|
$(".export_form").on("submit", checkSubmit);
|
||||||
|
|
||||||
update();
|
update();
|
||||||
return map.getState();
|
return map.getState();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue