X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ab62a4b45317a52333918d59d9ec8e3181cd4474..013ef53c97a1d2c8319f1ac624e8325a06828366:/public/javascripts/map.js?ds=sidebyside diff --git a/public/javascripts/map.js b/public/javascripts/map.js index b3d964b5b..db5b85616 100644 --- a/public/javascripts/map.js +++ b/public/javascripts/map.js @@ -109,6 +109,10 @@ function setMapExtent(extent) { map.zoomToExtent(extent.clone().transform(epsg4326, map.getProjectionObject())); } +function getMapExtent(extent) { + return map.getExtent().clone().transform(map.getProjectionObject(), epsg4326); +} + function getEventPosition(event) { return map.getLonLatFromViewPortPx(event.xy).clone().transform(map.getProjectionObject(), epsg4326); }