the API then disable the export button and display a message rather
than forcibly disabling that export option. Closes #1996.
<div class="export_details">
<p><%= t'export.start.export_details' %></p>
</div>
<div class="export_details">
<p><%= t'export.start.export_details' %></p>
</div>
+
+ <div id="export_osm_too_large">
+ <p class="export_heading"><%= t'export.start.too_large.heading' %></p>
+
+ <div class="export_details">
+ <p><%= t'export.start.too_large.body' %></p>
+ </div
+ </div>
</div>
<div id="export_mapnik">
</div>
<div id="export_mapnik">
<div id="export_html">
<p class="export_heading"><%= t'export.start.options' %></p>
<div id="export_html">
<p class="export_heading"><%= t'export.start.options' %></p>
<div class="export_details">
<p><a id="add_marker" href="#"><%= t'export.start.add_marker' %></a></p>
<p id="marker_inputs" style="display:none">
<div class="export_details">
<p><a id="add_marker" href="#"><%= t'export.start.add_marker' %></a></p>
<p id="marker_inputs" style="display:none">
</div>
<p class="export_heading"><%= t'export.start.output' %></p>
</div>
<p class="export_heading"><%= t'export.start.output' %></p>
<div class="export_details">
<p><input type="text" id="export_html_text" style="width:95%" /></p>
<p><%= t'export.start.paste_html' %></p>
<div class="export_details">
<p><input type="text" id="export_html_text" style="width:95%" /></p>
<p><%= t'export.start.paste_html' %></p>
var bounds = new OpenLayers.Bounds($("minlon").value, $("minlat").value, $("maxlon").value, $("maxlat").value);
if (bounds.getWidth() * bounds.getHeight() > #{APP_CONFIG['max_request_area']}) {
var bounds = new OpenLayers.Bounds($("minlon").value, $("minlat").value, $("maxlon").value, $("maxlat").value);
if (bounds.getWidth() * bounds.getHeight() > #{APP_CONFIG['max_request_area']}) {
- $("format_osm").disabled = true;
- $("format_osm").checked = false;
- $("export_osm").style.display = "none";
+ $("export_osm_too_large").style.display = "block";
- $("format_osm").disabled = false;
+ $("export_osm_too_large").style.display = "none";
}
var max_scale = maxMapnikScale();
}
var max_scale = maxMapnikScale();
- if ($("format_mapnik").checked && $("mapnik_scale").value < max_scale) {
+ if ($("format_osm").checked && bounds.getWidth() * bounds.getHeight() > #{APP_CONFIG['max_request_area']}) {
+ $("export_commit").disabled = true;
+ } else if ($("format_mapnik").checked && $("mapnik_scale").value < max_scale) {
$("export_commit").disabled = true;
} else {
$("export_commit").disabled = false;
$("export_commit").disabled = true;
} else {
$("export_commit").disabled = false;
embeddable_html: "Embeddable HTML"
licence: "Licence"
export_details: 'OpenStreetMap data is licensed under the <a href="http://creativecommons.org/licenses/by-sa/2.0/">Creative Commons Attribution-ShareAlike 2.0 license</a>.'
embeddable_html: "Embeddable HTML"
licence: "Licence"
export_details: 'OpenStreetMap data is licensed under the <a href="http://creativecommons.org/licenses/by-sa/2.0/">Creative Commons Attribution-ShareAlike 2.0 license</a>.'
+ too_large:
+ heading: "Area Too Large"
+ body: "This area is too large to be exported as OpenStreetMap XML Data. Please zoom in or select a smaller area."
options: "Options"
format: "Format"
scale: "Scale"
options: "Options"
format: "Format"
scale: "Scale"