X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/721dd9c27d299455b9159457a095716f797389f1..0f3e5a28c04a1a7899a39d594eb05a2f48d5db6d:/public/javascripts/map.js diff --git a/public/javascripts/map.js b/public/javascripts/map.js index fcf34336f..a25564f0d 100644 --- a/public/javascripts/map.js +++ b/public/javascripts/map.js @@ -134,6 +134,7 @@ function getMapCenter(center, zoom) { } function setMapCenter(center, zoom) { + zoom = parseInt(zoom); var numzoom = map.getNumZoomLevels(); if (zoom >= numzoom) zoom = numzoom - 1; map.setCenter(center.clone().transform(epsg4326, map.getProjectionObject()), zoom); @@ -143,7 +144,7 @@ function setMapExtent(extent) { map.zoomToExtent(extent.clone().transform(epsg4326, map.getProjectionObject())); } -function getMapExtent(extent) { +function getMapExtent() { return map.getExtent().clone().transform(map.getProjectionObject(), epsg4326); }