X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0b8449d2c95c52402b4a8cc7f49362820a752cc0..afe8dd51ece21325eea8a108515b9426764de5b2:/public/javascripts/map.js diff --git a/public/javascripts/map.js b/public/javascripts/map.js index c80ed2242..608f4c264 100644 --- a/public/javascripts/map.js +++ b/public/javascripts/map.js @@ -13,6 +13,8 @@ var nonamekeys = { }; OpenLayers._getScriptLocation = function () { + // Should really have this file as an erb, so that this can return + // the real rails root return "/openlayers/"; } @@ -132,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);