X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e728305eecf7ad95533b2f7b6ee8025ba61b2043..acbc99ac16103e1be5c1ef1841794f259e3b6a03:/app/views/browse/_map.html.erb?ds=sidebyside diff --git a/app/views/browse/_map.html.erb b/app/views/browse/_map.html.erb index 5bb83b6bf..5d7285840 100644 --- a/app/views/browse/_map.html.erb +++ b/app/views/browse/_map.html.erb @@ -40,6 +40,14 @@ $("area_larger_map").href = '/?minlon='+minlon+'&minlat='+minlat+'&maxlon='+maxlon+'&maxlat='+maxlat+'&box=yes'; $("area_larger_map").innerHTML = "<%= t 'browse.map.larger.area' %>"; + <% else if map.instance_of? MapBug %> + $("loading").innerHTML = ""; + var centre = new OpenLayers.LonLat(<%= map.lon %>, <%= map.lat %>); + var zoom = 16; + setMapCenter(centre, zoom); + marker = addMarkerToMap(centre); + $("area_larger_map").href = '/?mlon=<%= map.lon %>&mlat=<%=map.lat %>'; + $("area_larger_map").innerHTML = "<%= t 'browse.map.larger.area' %>"; <% else %> var obj_type = "<%= map.class.name.downcase %>"; var obj_id = <%= map.id %>; @@ -66,7 +74,7 @@ $("small_map").style.display = "none"; } }); - <% end %> + <% end end %> } window.onload = init;