X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/bf29550db840c97cafffbe1e836750bef6c7942d..6167bb650286e30cf9e1beed107b794c03bb3909:/public/javascripts/map.js?ds=sidebyside 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); }