]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/_id.html.erb
Instruct iD to load gpx file
[rails.git] / app / views / site / _id.html.erb
index f88942669ecbb19595f5b6f62c4378ae68175e4e..db611f4286855f0603816515435f367d59525c33 100644 (file)
       params.background = hashParams.background;
     }
 
+<% if params[:gpx] -%>
+    params.gpx = '<%= trace_data_url(params[:gpx]) %>';
+<% else -%>
     if (hashParams.gpx) {
       params.gpx = hashParams.gpx;
     }
+<% end -%>
 
     $('#id-embed').attr('src', '<%= id_url :locale => params[:locale] %>#' + querystring.stringify(params));
   </script>