X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f2ae082a1f360c25621f73dd872c746659c61ef2..c319fd5e2200cb855bff567b8c3e6da759e49c7b:/app/views/export/start.rjs diff --git a/app/views/export/start.rjs b/app/views/export/start.rjs index 375c0ab39..c146e236d 100644 --- a/app/views/export/start.rjs +++ b/app/views/export/start.rjs @@ -1,8 +1,10 @@ -page.replace_html :sidebar_title, 'Export' +page.replace_html :sidebar_title, t('export.start_rjs.export') page.replace_html :sidebar_content, :partial => 'start' 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"; @@ -160,18 +225,31 @@ page << <'; + + // Create "larger map" link var center = bounds.getCenterLonLat(); - var url = "http://#{SERVER_URL}/export/embed.html?lat=" + center.lat.toFixed(5) + "&lon=" + center.lon.toFixed(5) + "&zoom=" + zoom; + var epsg4326 = new OpenLayers.Projection("EPSG:4326"); + var epsg900913 = new OpenLayers.Projection("EPSG:900913"); - if ($("html_marker").checked) { - url += "&marker=true"; - } + bounds.transform(epsg4326, epsg900913); + var zoom = map.getZoomForExtent(bounds); + + var layers = getMapLayers(); + + html += '
'+"#{I18n.t('export.start_rjs.view_larger_map')}"+''; - var html = ''; $("export_html_text").value = html; if ($("format_html").checked) { @@ -179,8 +257,6 @@ page << <