Add ol.View2D.prototype.setZoom
This commit is contained in:
@@ -4,3 +4,4 @@
|
||||
@exportProperty ol.View2D.prototype.constrainRotation
|
||||
@exportProperty ol.View2D.prototype.fitExtent
|
||||
@exportProperty ol.View2D.prototype.getView2D
|
||||
@exportProperty ol.View2D.prototype.setZoom
|
||||
|
||||
@@ -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