<p>Here is a rudimentary patch, which adds a drop-down list into the 'Export' site. Now you can select between different formats, OSM XML being the default as before, additionally Notes in the four supported formats.</p>
<p>This also has the beneficial side effect that now one knows that OSM XML data will be exported. This wasn't clear to me before pressing the Export button to start the download.</p>
<p>I don't have the time and surely am lacking some web development skills to bring it forward in the near future, but maybe it is a starting point for someone else.</p>
<div class="highlight highlight-patch"><pre><span class="pl-c1">diff --git a/app/controllers/export_controller.rb b/app/controllers/export_controller.rb</span>
index bd020f2..ee9f8d3 100644
<span class="pl-md">--- a/app/controllers/export_controller.rb</span>
<span class="pl-mi1">+++ b/app/controllers/export_controller.rb</span>
<span class="pl-mdr">@@ -13,6 +13,22 @@</span> class ExportController < ApplicationController
# redirect to API map get
redirect_to "http://api.openstreetmap.org/api/#{API_VERSION}/map?bbox=#{bbox}"
<span class="pl-mi1">+ elsif format == "notes_rss"</span>
<span class="pl-mi1">+ # redirect to API notes get</span>
<span class="pl-mi1">+ redirect_to "http://api.openstreetmap.org/api/#{API_VERSION}/notes.rss?bbox=#{bbox}&limit=10000"</span>
<span class="pl-mi1">+</span>
<span class="pl-mi1">+ elsif format == "notes_xml"</span>
<span class="pl-mi1">+ # redirect to API notes get</span>
<span class="pl-mi1">+ redirect_to "http://api.openstreetmap.org/api/#{API_VERSION}/notes.xml?bbox=#{bbox}&limit=10000"</span>
<span class="pl-mi1">+</span>
<span class="pl-mi1">+ elsif format == "notes_json"</span>
<span class="pl-mi1">+ # redirect to API notes get</span>
<span class="pl-mi1">+ redirect_to "http://api.openstreetmap.org/api/#{API_VERSION}/notes.json?bbox=#{bbox}&limit=10000"</span>
<span class="pl-mi1">+</span>
<span class="pl-mi1">+ elsif format == "notes_gpx"</span>
<span class="pl-mi1">+ # redirect to API notes get</span>
<span class="pl-mi1">+ redirect_to "http://api.openstreetmap.org/api/#{API_VERSION}/notes.gpx?bbox=#{bbox}&limit=10000"</span>
<span class="pl-mi1">+</span>
elsif format == "mapnik"
# redirect to a special 'export' cgi script
format = params[:mapnik_format]
<span class="pl-c1">diff --git a/app/views/site/export.html.erb b/app/views/site/export.html.erb</span>
index 6bf3365..68ef08e 100644
<span class="pl-md">--- a/app/views/site/export.html.erb</span>
<span class="pl-mi1">+++ b/app/views/site/export.html.erb</span>
<span class="pl-mdr">@@ -6,7 +6,6 @@</span>
</h2>
<%= form_tag({:controller => "export", :action => "finish"}, :class => "export_form") do %>
<span class="pl-md">- <%= hidden_field_tag 'format', 'osm' %></span>
<div class='export_area_inputs'>
<div class='export_boxy' style="border: 1px solid #ccc;">
<span class="pl-mdr">@@ -29,6 +28,17 @@</span>
</p>
</div>
<span class="pl-mi1">+ <div></span>
<span class="pl-mi1">+ <label for="format">Data type:</label></span>
<span class="pl-mi1">+ <select id="format" name="format"></span>
<span class="pl-mi1">+ <option value="osm">Map data (OSM XML)</option></span>
<span class="pl-mi1">+ <option value="notes_rss">Notes (RSS)</option></span>
<span class="pl-mi1">+ <option value="notes_xml">Notes (XML)</option></span>
<span class="pl-mi1">+ <option value="notes_json">Notes (JSON)</option></span>
<span class="pl-mi1">+ <option value="notes_gpx">Notes (GPX)</option></span>
<span class="pl-mi1">+ </select></span>
<span class="pl-mi1">+ </div></span>
<span class="pl-mi1">+</span>
<div id="export_commit">
<div class="export_button">
<%= submit_tag t('export.start.export_button') %></pre></div>
<p>Before (original):<br>
<a href="https://cloud.githubusercontent.com/assets/6334512/8945163/61b158c0-3585-11e5-9102-12c9e23e1aa6.png" target="_blank"><img src="https://cloud.githubusercontent.com/assets/6334512/8945163/61b158c0-3585-11e5-9102-12c9e23e1aa6.png" alt="Export original" style="max-width:100%;"></a></p>
<p>After (with selection):<br>
<a href="https://cloud.githubusercontent.com/assets/6334512/8945166/66d47148-3585-11e5-90ec-f1cfc4d6d14e.png" target="_blank"><img src="https://cloud.githubusercontent.com/assets/6334512/8945166/66d47148-3585-11e5-90ec-f1cfc4d6d14e.png" alt="Export with selection" style="max-width:100%;"></a></p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/openstreetmap/openstreetmap-website/issues/427#issuecomment-125767779">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABWnLZvUrtRjl_Q6e8ipzScAI1XcxGcOks5oh_VzgaJpZM4A4VAo.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/openstreetmap/openstreetmap-website/issues/427#issuecomment-125767779"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>