X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7a98913d0cf74887180aca3520c628a52b0e7071..52054e6b23f3ff147ba34104b6f25b44c56ff158:/app/views/site/_id.html.erb diff --git a/app/views/site/_id.html.erb b/app/views/site/_id.html.erb index 680c45cde..f88942669 100644 --- a/app/views/site/_id.html.erb +++ b/app/views/site/_id.html.erb @@ -1,34 +1,37 @@ <% if defined? ID_KEY %> - -<% token = @user.access_token(ID_KEY) %> - -<% else%> - -<% end %> + } - + 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 %> + +<% end %>