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());
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";