]> git.openstreetmap.org Git - rails.git/blobdiff - public/javascripts/map.js
fix backspacing through way to delete it
[rails.git] / public / javascripts / map.js
index c80ed2242c8147db90177925af3db63eacee971f..608f4c264a166fa5dfb54521c7bd87c25d14b03f 100644 (file)
@@ -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);