From: Roland Olbricht Date: Sat, 7 Dec 2013 14:56:47 +0000 (+0000) Subject: Improve display of alternative download sources X-Git-Tag: live~4552 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/83b3db99747b9630dff3ad3292a68daa6599d0e5?ds=sidebyside Improve display of alternative download sources Makes the list of alternative sources displayed all the time rather than just when the bounding box is too large, and adds the Overpass API to the list of sources. Fixes #606 Fixed #635 --- diff --git a/app/assets/javascripts/index/export.js b/app/assets/javascripts/index/export.js index 053f5169f..fd658c532 100644 --- a/app/assets/javascripts/index/export.js +++ b/app/assets/javascripts/index/export.js @@ -41,6 +41,11 @@ OSM.Export = function(map) { $("#minlat").val(bounds.getSouth().toFixed(precision)); $("#maxlon").val(bounds.getEast().toFixed(precision)); $("#maxlat").val(bounds.getNorth().toFixed(precision)); + + $("#export_overpass").attr("href", + "http://overpass-api.de/api/map?bbox=" + + $("#minlon").val() + "," + $("#minlat").val() + "," + + $("#maxlon").val() + "," + $("#maxlat").val()); } function validateControls() { diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index 75c921336..fa6136089 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -1160,6 +1160,7 @@ header .search_form { .export_button { margin-top: $lineheight; + margin-bottom: $lineheight; } dl { diff --git a/app/views/site/export.html.erb b/app/views/site/export.html.erb index 176507207..78b98ae08 100644 --- a/app/views/site/export.html.erb +++ b/app/views/site/export.html.erb @@ -27,22 +27,30 @@

<%= t'export.start.too_large.body' %>

-
-
<%= t'export.start.too_large.planet.title' %>
-
<%= t'export.start.too_large.planet.description' %>
- -
<%= t'export.start.too_large.geofabrik.title' %>
-
<%= t'export.start.too_large.geofabrik.description' %>
+ -
<%= t'export.start.too_large.metro.title' %>
-
<%= t'export.start.too_large.metro.description' %>
+
+
+ <%= submit_tag t('export.start.export_button') %> +
-
<%= t'export.start.too_large.other.title' %>
-
<%= t'export.start.too_large.other.description' %>
-
+

<%= t'export.start.too_large.advice' %>

-
- <%= submit_tag t('export.start.export_button'), :id => "export_commit" %> -
+
+
<%= t'export.start.too_large.overpass.title' %>
+
<%= t'export.start.too_large.overpass.description' %>
+ +
<%= t'export.start.too_large.planet.title' %>
+
<%= t'export.start.too_large.planet.description' %>
+ +
<%= t'export.start.too_large.geofabrik.title' %>
+
<%= t'export.start.too_large.geofabrik.description' %>
+ +
<%= t'export.start.too_large.metro.title' %>
+
<%= t'export.start.too_large.metro.description' %>
+ +
<%= t'export.start.too_large.other.title' %>
+
<%= t'export.start.too_large.other.description' %>
+
<% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 53d5d541b..46f88d19b 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -310,10 +310,14 @@ en: licence: "Licence" export_details: 'OpenStreetMap data is licensed under the Open Data Commons Open Database License (ODbL).' too_large: + advice: "If the above export fails, please consider using one of the sources listed below:" body: "This area is too large to be exported as OpenStreetMap XML Data. Please zoom in or select a smaller area, or use one of the sources listed below for bulk data downloads." planet: title: "Planet OSM" description: "Regularly-updated copies of the complete OpenStreetMap database" + overpass: + title: "Overpass API" + description: "Download this bounding box from a mirror of the OpenStreetMap database" geofabrik: title: "Geofabrik Downloads" description: "Regularly-updated extracts of continents, countries, and selected cities"