X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/78d4944caabb269b7b5cc43802d9b46798e47dfe..c22958faed2e60b7277607fdee6f94976b9caf39:/public/javascripts/map.js 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); }