X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/56fd5c4d90c7d3757fb97ff16c40aaa307ae1d22..1104165e7ba4640e0c5e0bb4361e76f6911407bd:/app/views/site/_id.html.erb diff --git a/app/views/site/_id.html.erb b/app/views/site/_id.html.erb index 5a0a7a432..059009a0c 100644 --- a/app/views/site/_id.html.erb +++ b/app/views/site/_id.html.erb @@ -9,7 +9,11 @@ if (mapParams.object) { 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));