Better docs for View2DOptions
This commit is contained in:
+26
-14
@@ -88,21 +88,33 @@
|
|||||||
/**
|
/**
|
||||||
* Object literal with config options for the view.
|
* Object literal with config options for the view.
|
||||||
* @typedef {Object} ol.View2DOptions
|
* @typedef {Object} ol.View2DOptions
|
||||||
* @property {ol.Coordinate|undefined} center The view center in map projection.
|
* @property {ol.Coordinate|undefined} center The initial center for the view.
|
||||||
* @property {number|undefined} maxResolution The maximum resolution in map
|
* The coordinate system for the center is specified with the `projection`
|
||||||
* units per pixel.
|
* option.
|
||||||
* @property {number|undefined} maxZoom The maximum zoom level for this view.
|
* @property {number|undefined} maxResolution The maximum resolution used to
|
||||||
* Zoom level 0 uses the `maxResolution`; subsequent zoom levels are
|
* determine the resolution constraint. It is used together with `maxZoom`
|
||||||
* calculated by dividing the previous resolution by `zoomFactor`.
|
* and `zoomFactor`. If unspecified it is calculated in such a way that the
|
||||||
* @property {ol.ProjectionLike} projection The map projection.
|
* projection's validity extent fits in a 256x256 px tile. If the projection
|
||||||
|
* is Spherical Mercator (the default) then `maxResolution` defaults to
|
||||||
|
* 40075016.68557849 / 256 = 156543.03392804097.
|
||||||
|
* @property {number|undefined} maxZoom The maximum zoom level used to determine
|
||||||
|
* the resolution constraint. It is used together with `maxResolution` and
|
||||||
|
* `zoomFactor`. Default is 28.
|
||||||
|
* @property {ol.ProjectionLike} projection The projection. Default is
|
||||||
|
* `EPSG:3857` (Spherical Mercator).
|
||||||
* @property {number|undefined} resolution The initial resolution for the view.
|
* @property {number|undefined} resolution The initial resolution for the view.
|
||||||
* @property {Array.<number>|undefined} resolutions The resolutions for this
|
* The units are `projection` units per pixel (e.g. meters per pixel).
|
||||||
* view. If configured, this is equivalent to specifying `maxResolution` and
|
* @property {Array.<number>|undefined} resolutions Resolutions to determine the
|
||||||
* `maxZoom`.
|
* resolution constraint. If set the `maxResolution`, `maxZoom` and
|
||||||
* @property {number|undefined} rotation Initial rotation of the view.
|
* `zoomFactor` options are ignored.
|
||||||
* @property {number|undefined} zoom Initial zoom level of the view.
|
* @property {number|undefined} rotation The initial rotation for the view
|
||||||
* @property {number|undefined} zoomFactor Factor to calculate resolutions for
|
* in radians (positive rotation clockwise).
|
||||||
* zoom levels. Default is 2.
|
* @property {number|undefined} zoom Zoom level used to calculate the initial
|
||||||
|
* resolution for the view. The initial resolution is determined using the
|
||||||
|
* `ol.View2D#constrainResolution` method.
|
||||||
|
* @property {number|undefined} zoomFactor The zoom factor used to determine the
|
||||||
|
* resolution constraint. It is together with `maxResolution` and `maxZoom`.
|
||||||
|
* Default is 2.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user