X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/68a3df4d53c84508bf443058040379c3a18eb1a7..52054e6b23f3ff147ba34104b6f25b44c56ff158:/app/views/site/_id.html.erb diff --git a/app/views/site/_id.html.erb b/app/views/site/_id.html.erb index cb0c53fc3..f88942669 100644 --- a/app/views/site/_id.html.erb +++ b/app/views/site/_id.html.erb @@ -6,10 +6,12 @@ var params = {}; var mapParams = OSM.mapParams(); - if (mapParams.object && - mapParams.object.type !== 'note' && - mapParams.object.type !== 'changeset') { + if (mapParams.object) { params.id = mapParams.object.type[0] + mapParams.object.id; + mapParams = OSM.parseHash(location.hash); + if (mapParams.center) { + params.map = mapParams.zoom + '/' + mapParams.center.lng + '/' + mapParams.center.lat; + } } else { <% if @lat && @lon -%> params.map = '16/<%= @lon %>/<%= @lat %>';