X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f2ae082a1f360c25621f73dd872c746659c61ef2..c0b4c1b9059890e1fb683a9822b966d4efd2698c:/app/views/export/start.rjs diff --git a/app/views/export/start.rjs b/app/views/export/start.rjs index 375c0ab39..47cf9ce6b 100644 --- a/app/views/export/start.rjs +++ b/app/views/export/start.rjs @@ -3,6 +3,8 @@ page.replace_html :sidebar_content, :partial => 'start' 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 += '
View Larger Map'; - var html = ''; $("export_html_text").value = html; if ($("format_html").checked) { @@ -179,8 +257,6 @@ page << <