Don't hardcode bbox size 0.25, use APP_CONFIG['max_request_area'] instead
This commit is contained in:
parent
b653ace377
commit
3622db1665
2 changed files with 2 additions and 2 deletions
|
@ -186,7 +186,7 @@ page << <<EOJ
|
|||
var projected = bounds.clone().transform(new OpenLayers.Projection("EPSG:900913"), new OpenLayers.Projection("EPSG:4326"));
|
||||
var size = projected.getWidth() * projected.getHeight();
|
||||
|
||||
if (size > 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());
|
||||
|
|
|
@ -190,7 +190,7 @@ page << <<EOJ
|
|||
function validateControls() {
|
||||
var bounds = new OpenLayers.Bounds($("minlon").value, $("minlat").value, $("maxlon").value, $("maxlat").value);
|
||||
|
||||
if (bounds.getWidth() * bounds.getHeight() > 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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue