]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/_id.html.erb
Centre editors correctly when note=N is specified
[rails.git] / app / views / site / _id.html.erb
index 5a0a7a4324374e0953a0fc6981eacd7e7d188cff..059009a0c9af07c535e5d3e97411d4a55d509c73 100644 (file)
@@ -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));