X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/78d4944caabb269b7b5cc43802d9b46798e47dfe..bcf8574dde38ab0473713dbea24ec49016a63853:/public/javascripts/map.js?ds=inline diff --git a/public/javascripts/map.js b/public/javascripts/map.js index e548a89a4..2349c3230 100644 --- a/public/javascripts/map.js +++ b/public/javascripts/map.js @@ -193,7 +193,7 @@ function removeBoxFromMap(box){ vectors.removeFeature(box); } -function getMapCenter(center, zoom) { +function getMapCenter() { return map.getCenter().clone().transform(map.getProjectionObject(), epsg4326); } @@ -212,6 +212,10 @@ function getMapExtent() { return map.getExtent().clone().transform(map.getProjectionObject(), epsg4326); } +function getMapZoom() { + return map.getZoom(); +} + function getEventPosition(event) { return map.getLonLatFromViewPortPx(event.xy).clone().transform(map.getProjectionObject(), epsg4326); }