From 3622db1665a51795cd381745b59693d88d66f699 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sat, 6 Jun 2009 18:13:11 +0000 Subject: [PATCH 1/1] Don't hardcode bbox size 0.25, use APP_CONFIG['max_request_area'] instead --- app/views/browse/start.rjs | 2 +- app/views/export/start.rjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/browse/start.rjs b/app/views/browse/start.rjs index 244456f11..8eaf90070 100644 --- a/app/views/browse/start.rjs +++ b/app/views/browse/start.rjs @@ -186,7 +186,7 @@ page << < 0.25) { + if (size > #{APP_CONFIG['max_request_area']}) { setStatus("#{I18n.t('browse.start_rjs.unable_to_load')} " + size + " #{I18n.t('browse.start_rjs.must_be_smaller')}"); } else { loadGML("/api/#{API_VERSION}/map?bbox=" + projected.toBBOX()); diff --git a/app/views/export/start.rjs b/app/views/export/start.rjs index dd879132a..8a17ca6ae 100644 --- a/app/views/export/start.rjs +++ b/app/views/export/start.rjs @@ -190,7 +190,7 @@ page << < 0.25) { + if (bounds.getWidth() * bounds.getHeight() > #{APP_CONFIG['max_request_area']}) { $("format_osm").disabled = true; $("format_osm").checked = false; $("export_osm").style.display = "none"; -- 2.39.5