Pleasant zoom.

This commit is contained in:
Tim Schaub
2012-06-23 02:50:00 +02:00
parent 0554bceb29
commit 76d90428bd
3 changed files with 11 additions and 14 deletions
+1 -1
View File
@@ -288,7 +288,7 @@ ol.Map.prototype.setUserProjection = function(userProjection) {
* @param {number} zoom Zoom.
*/
ol.Map.prototype.setZoom = function(zoom) {
if (zoom !== this.zoom_) {
if (zoom !== this.zoom_ && zoom >= 0 && zoom < this.getNumZoomLevels()) {
this.zoom_ = zoom;
this.conditionallyRender();
}