diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 3269d6574c..1395173a76 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -806,7 +806,9 @@ OpenLayers.Map.prototype = { * @param {int} zoom */ zoomTo: function(zoom) { - this.setCenter(null, zoom); + if (this.isValidZoomLevel(zoom)) { + this.setCenter(null, zoom); + } }, /**