Add ol.View2D.prototype.setZoom
This commit is contained in:
@@ -398,6 +398,16 @@ goog.exportProperty(
|
||||
ol.View2D.prototype.setRotation);
|
||||
|
||||
|
||||
/**
|
||||
* Zoom to a specific zoom level.
|
||||
* @param {number} zoom Zoom level.
|
||||
*/
|
||||
ol.View2D.prototype.setZoom = function(zoom) {
|
||||
var resolution = this.constrainResolution(this.maxResolution_, zoom);
|
||||
this.setResolution(resolution);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {ol.View2DOptions} options View2D options.
|
||||
|
||||
Reference in New Issue
Block a user