X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/18fcf61953f01d260b49c3ee4fea60c04b5907d6..95d899786a1bbabacc0cd12ef1c4814118d9d0de:/app/views/browse/_map.html.erb diff --git a/app/views/browse/_map.html.erb b/app/views/browse/_map.html.erb index 1ff86cd4e..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();