From 484fc207cf31381d06e5388236271749038e9d34 Mon Sep 17 00:00:00 2001 From: euzuro Date: Sat, 19 Aug 2006 03:53:50 +0000 Subject: [PATCH] fix for #180 -- check zoomlevel bounds before calling setCenter() git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1304 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Map.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); + } }, /**