X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/78d6bde4850a09a7cd9cb5774f394fd64680d664..c798962cda8ede6425ce56c59533bc476180a830:/app/views/site/_id.html.erb diff --git a/app/views/site/_id.html.erb b/app/views/site/_id.html.erb index 5a0a7a432..195873c34 100644 --- a/app/views/site/_id.html.erb +++ b/app/views/site/_id.html.erb @@ -6,10 +6,16 @@ var params = {}; var mapParams = OSM.mapParams(); - if (mapParams.object) { + if (mapParams.object && + mapParams.object.type !== 'note' && + mapParams.object.type !== 'changeset') { params.id = mapParams.object.type[0] + mapParams.object.id; } else { +<% if @lat && @lon -%> + params.map = '16/<%= @lon %>/<%= @lat %>'; +<% else -%> params.map = (mapParams.zoom || 17) + '/' + mapParams.lon + '/' + mapParams.lat; +<% end -%> } var hashParams = OSM.params(location.hash.substring(1));