]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/_id.html.erb
Support passing imagery offset parameter to iD
[rails.git] / app / views / site / _id.html.erb
index 7ddee6218269792a64b18bbc4301ce15945d84e3..ed36385bd47822b330a8561cfb3250135e99eb99 100644 (file)
@@ -1,6 +1,6 @@
 <% if defined? ID_KEY %>
   <div id="map">
-    <iframe frameBorder="0" id="id-embed" class="id-embed"></iframe>
+    <iframe frameBorder="0" id="id-embed" class="id-embed" allowfullscreen></iframe>
   </div>
   <script>
     var params = {};
     if (hashParams.background) {
       params.background = hashParams.background;
     }
-
     if (hashParams.comment) {
       params.comment = hashParams.comment;
     }
+    if (hashParams.offset) {
+      params.offset = hashParams.offset;
+    }
 
 <% if params[:gpx] -%>
-    params.gpx = '<%= trace_data_url(params[:gpx]) %>';
+    params.gpx = '<%= trace_data_url(params[:gpx], :format => :xml) %>';
 <% else -%>
     if (hashParams.gpx) {
       params.gpx = hashParams.gpx;