Pass zoom to map.setCenter as an integer (Closes #1547)
authorThomas Wood <grand.edgemaster@gmail.com>
Sat, 31 Jan 2009 13:10:16 +0000 (13:10 +0000)
committerThomas Wood <grand.edgemaster@gmail.com>
Sat, 31 Jan 2009 13:10:16 +0000 (13:10 +0000)
public/javascripts/map.js

index c80ed2242c8147db90177925af3db63eacee971f..3b05b1d4a962861a53388a78190b72a97eeb1bef 100644 (file)
@@ -132,6 +132,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);