X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/929f05d9d259bf7d67ca92b8a86f391aa58dfb19..95d899786a1bbabacc0cd12ef1c4814118d9d0de:/app/views/browse/_map.html.erb diff --git a/app/views/browse/_map.html.erb b/app/views/browse/_map.html.erb index 6641b0dd7..4b2093e3f 100644 --- a/app/views/browse/_map.html.erb +++ b/app/views/browse/_map.html.erb @@ -72,10 +72,11 @@ }); <% if map.instance_of? Changeset %> - var minlon = <%= map.min_lon / GeoRecord::SCALE.to_f %>; - var minlat = <%= map.min_lat / GeoRecord::SCALE.to_f %>; - var maxlon = <%= map.max_lon / GeoRecord::SCALE.to_f %>; - var maxlat = <%= map.max_lat / GeoRecord::SCALE.to_f %>; + <% bbox = map.bbox.to_unscaled %> + var minlon = <%= bbox.min_lon %>; + var minlat = <%= bbox.min_lat %>; + var maxlon = <%= bbox.max_lon %>; + var maxlat = <%= bbox.max_lat %>; var bbox = new OpenLayers.Bounds(minlon, minlat, maxlon, maxlat); var centre = bbox.getCenterLonLat(); @@ -89,12 +90,12 @@ }); $("remote_area_edit").observe("click", function (event) { - remoteEditHandler(event, extent); + remoteEditHandler(event, bbox); }); <% if preferred_editor == "remote" %> $("area_edit").observe("click", function (event) { - remoteEditHandler(event, extent); + remoteEditHandler(event, bbox); }); <% end %>