Remove osmarender export option
This commit is contained in:
parent
acbd254e4a
commit
23e016e908
2 changed files with 0 additions and 47 deletions
|
@ -22,8 +22,6 @@
|
||||||
<br/>
|
<br/>
|
||||||
<%= radio_button_tag("format", "mapnik") %> <%= t'export.start.mapnik_image' %>
|
<%= radio_button_tag("format", "mapnik") %> <%= t'export.start.mapnik_image' %>
|
||||||
<br/>
|
<br/>
|
||||||
<%= radio_button_tag("format", "osmarender") %> <%= t'export.start.osmarender_image' %>
|
|
||||||
<br/>
|
|
||||||
<%= radio_button_tag("format", "html") %> <%= t'export.start.embeddable_html' %>
|
<%= radio_button_tag("format", "html") %> <%= t'export.start.embeddable_html' %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -54,15 +52,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="export_osmarender">
|
|
||||||
<p class="export_heading"><%= t'export.start.options' %></p>
|
|
||||||
|
|
||||||
<div class="export_details">
|
|
||||||
<p><%= t'export.start.format' %> <%= select_tag("osmarender_format", options_for_select([["PNG", "png"], ["JPEG", "jpeg"]], "png")) %></p>
|
|
||||||
<p><%= t'export.start.zoom' %> <%= select_tag("osmarender_zoom", options_for_select([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17])) %></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="export_html">
|
<div id="export_html">
|
||||||
<p class="export_heading"><%= t'export.start.options' %></p>
|
<p class="export_heading"><%= t'export.start.options' %></p>
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,6 @@ function startExport() {
|
||||||
|
|
||||||
$("#format_osm").click(formatChanged);
|
$("#format_osm").click(formatChanged);
|
||||||
$("#format_mapnik").click(formatChanged);
|
$("#format_mapnik").click(formatChanged);
|
||||||
$("#format_osmarender").click(formatChanged);
|
|
||||||
$("#format_html").click(formatChanged);
|
$("#format_html").click(formatChanged);
|
||||||
|
|
||||||
$("#mapnik_scale").change(mapnikSizeChanged);
|
$("#mapnik_scale").change(mapnikSizeChanged);
|
||||||
|
@ -54,8 +53,6 @@ function startExport() {
|
||||||
|
|
||||||
if (map.baseLayer.name == "Mapnik") {
|
if (map.baseLayer.name == "Mapnik") {
|
||||||
$("#format_mapnik").prop("checked", true);
|
$("#format_mapnik").prop("checked", true);
|
||||||
} else if (map.baseLayer.name == "Osmarender") {
|
|
||||||
$("#format_osmarender").prop("checked", true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
formatChanged();
|
formatChanged();
|
||||||
|
@ -227,20 +224,6 @@ function validateControls() {
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#mapnik_max_scale").html(roundScale(max_scale));
|
$("#mapnik_max_scale").html(roundScale(max_scale));
|
||||||
|
|
||||||
var max_zoom = maxOsmarenderZoom();
|
|
||||||
|
|
||||||
$("#osmarender_zoom option").each(function () {
|
|
||||||
if ($(this).val() > max_zoom) {
|
|
||||||
$(this).prop("disabled", true);
|
|
||||||
} else {
|
|
||||||
$(this).prop("disabled", false);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if ($("#osmarender_zoom option").is(":disabled:selected")) {
|
|
||||||
$("#osmarender_zoom option").filter(":enabled").last().prop("selected", true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function htmlUrlChanged() {
|
function htmlUrlChanged() {
|
||||||
|
@ -291,15 +274,6 @@ function formatChanged() {
|
||||||
$("#export_mapnik").hide();
|
$("#export_mapnik").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($("#format_osmarender").prop("checked")) {
|
|
||||||
var zoom = Math.min(map.getZoom(), maxOsmarenderZoom());
|
|
||||||
|
|
||||||
$("#osmarender_zoom option[value=" + zoom + "]").prop("selected", true);
|
|
||||||
$("#export_osmarender").show();
|
|
||||||
} else {
|
|
||||||
$("#export_osmarender").hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($("#format_html").prop("checked")) {
|
if ($("#format_html").prop("checked")) {
|
||||||
$("#export_html").show();
|
$("#export_html").show();
|
||||||
$("#export_commit").hide();
|
$("#export_commit").hide();
|
||||||
|
@ -334,16 +308,6 @@ function mapnikImageSize(scale) {
|
||||||
Math.round(bounds.getHeight() / scale / 0.00028));
|
Math.round(bounds.getHeight() / scale / 0.00028));
|
||||||
}
|
}
|
||||||
|
|
||||||
function maxOsmarenderZoom() {
|
|
||||||
var bounds = new OpenLayers.Bounds($("#minlon").val(), $("#minlat").val(), $("#maxlon").val(), $("#maxlat").val());
|
|
||||||
var xzoom = Math.LOG2E * Math.log(2000 * 1.40625 / bounds.getWidth());
|
|
||||||
var ymin = bounds.bottom * Math.PI / 180;
|
|
||||||
var ymax = bounds.top * Math.PI / 180;
|
|
||||||
var yzoom = Math.LOG2E * (Math.log(2000 * 2 * Math.PI) - Math.log(Math.log((Math.tan(ymax) + 1 / Math.cos(ymax)) / (Math.tan(ymin) + 1 / Math.cos(ymin)))))
|
|
||||||
|
|
||||||
return Math.min(Math.floor(Math.min(xzoom, yzoom)), 17);
|
|
||||||
}
|
|
||||||
|
|
||||||
function roundScale(scale) {
|
function roundScale(scale) {
|
||||||
var precision = 5 * Math.pow(10, Math.floor(Math.LOG10E * Math.log(scale)) - 2);
|
var precision = 5 * Math.pow(10, Math.floor(Math.LOG10E * Math.log(scale)) - 2);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue