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
This commit is contained in:
euzuro
2006-08-19 03:53:50 +00:00
parent cfd7858861
commit 484fc207cf

View File

@@ -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);
}
},
/**