From: John Firebaugh Date: Fri, 22 Nov 2013 18:57:07 +0000 (-0800) Subject: Pass along gpx parameter to iD X-Git-Tag: live~4660 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/1557f9cf8973abf4af50de95b4f995a59b601cea?hp=ebe7938886dd85021cd0e978d653b4ded54e9eba Pass along gpx parameter to iD See https://github.com/systemed/iD/issues/1965 --- diff --git a/app/views/site/_id.html.erb b/app/views/site/_id.html.erb index 059009a0c..6409582cd 100644 --- a/app/views/site/_id.html.erb +++ b/app/views/site/_id.html.erb @@ -17,10 +17,15 @@ } var hashParams = OSM.params(location.hash.substring(1)); + if (hashParams.background) { params.background = hashParams.background; } + if (hashParams.gpx) { + params.gpx = hashParams.gpx; + } + $('#id-embed').attr('src', '<%= id_url :locale => params[:locale] %>#' + querystring.stringify(params)); <% else %>