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:
@@ -806,7 +806,9 @@ OpenLayers.Map.prototype = {
|
|||||||
* @param {int} zoom
|
* @param {int} zoom
|
||||||
*/
|
*/
|
||||||
zoomTo: function(zoom) {
|
zoomTo: function(zoom) {
|
||||||
this.setCenter(null, zoom);
|
if (this.isValidZoomLevel(zoom)) {
|
||||||
|
this.setCenter(null, zoom);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user