The object has already been disposed.
Adds relative coordinates to the center of the view. Any extent constraint will apply.
Adds relative coordinates to the center of the view. Any extent constraint will apply.
Multiply the view resolution by a ratio, optionally using an anchor. Any resolution constraint will apply.
Multiply the view resolution by a ratio, optionally using an anchor. Any resolution constraint will apply.
Adds a value to the view rotation, optionally using an anchor. Any rotation constraint will apply.
Adds a value to the view zoom level, optionally using an anchor. Any resolution constraint will apply.
Animate the view. The view's center, zoom (or resolution), and rotation can be animated for smooth transitions between view states. For example, to animate the view to a new zoom level: By default, the animation lasts one second and uses in-and-out easing. You can customize this behavior by including duration (in milliseconds) and easing options (see {@link module:ol/easing}). To chain together multiple animations, call the method with multiple animation objects. For example, to first zoom and then pan: If you provide a function as the last argument to the animate method, it will get called at the end of an animation series. The callback will be called with true if the animation series completed on its own or false if it was cancelled. Animations are cancelled by user interactions (e.g. dragging the map) or by calling view.setCenter(), view.setResolution(), or view.setRotation() (or another method that calls one of these).
Set up the view with the given options.
Notify the View that an interaction has started. The view state will be resolved to a stable one if needed (depending on its constraints).
Calculate the extent for the current view state and the passed size. The size is the pixel dimensions of the box into which the calculated extent should fit. In most cases you want to get the extent of the entire map, that is map.getSize().
Cancel any ongoing animations.
Center on coordinate and view position.
Increases the revision counter and dispatches a 'change' event.
Dispatches an event and calls all listeners listening for events of this type. The event parameter can either be a string or an Object with a type property.
Clean up.
Clean up.
Notify the View that an interaction has ended. The view state will be resolved to a stable one if needed (depending on its constraints).
Notify the View that an interaction has ended. The view state will be resolved to a stable one if needed (depending on its constraints).
Fit the given geometry or extent based on the given map size and border. The size is pixel dimensions of the box to fit the extent into. In most cases you will want to use the map size, that is map.getSize(). Takes care of the map angle.
Gets a value.
Determine if the view is being animated.
Get the view center.
Get the view center without transforming to user projection.
Get a valid position for the view center according to the current constraints.
Get a valid resolution according to the current view constraints.
Get a valid zoom level according to the current view constraints.
Determine if the user is interacting with the view, such as panning or zooming.
Get a list of object property names.
Get the listeners for a specified event type. Listeners are returned in the order that they will be called in.
Get the maximum resolution of the view.
Get the maximum zoom level for the view.
Get the minimum resolution of the view.
Get the minimum zoom level for the view.
Get the view projection.
Get an object of all property names and values.
Get the view resolution.
Get the resolution for a provided extent (in map units) and size (in pixels).
Get the resolution for a provided extent (in map units) and size (in pixels).
Return a function that returns a value between 0 and 1 for a resolution. Exponential scaling is assumed.
Get the resolution for a zoom level.
Get the resolutions for the view. This returns the array of resolutions passed to the constructor of the View, or undefined if none were given.
Get the version number for this object. Each time the object is modified, its version number will be incremented.
Get the view rotation.
Get an updated version of the view options used to construct the view. The current resolution (or zoom), center, and rotation are applied to any stored options. The provided options can be used to apply new min/max zoom or resolution limits.
Return a function that returns a resolution for a value between 0 and 1. Exponential scaling is assumed.
Get the current zoom level. This method may return non-integer zoom levels if the view does not constrain the resolution, or if an interaction or animation is underway.
Get the zoom level for a resolution.
If any constraints need to be applied, an animation will be triggered. This is typically done on interaction end. Note: calling this with a duration of 0 will apply the constrained values straight away, without animation.
Sets a value.
Set the center of the current view. Any extent constraint will apply.
Set the center using the view projection (not the user projection).
Set whether the view shoud allow intermediary zoom levels.
Set a new maximum zoom level for the view.
Set a new minimum zoom level for the view.
Sets a collection of key-value pairs. Note that this changes any existing properties and adds new ones (it does not remove any existing properties).
Set the resolution for this view. Any resolution constraint will apply.
Set the rotation for this view. Any rotation constraint will apply.
Stores the viewport size on the view. The viewport size is not read every time from the DOM to avoid performance hit and layout reflow. This should be done on map size change. Note: the constraints are not resolved during an animation to avoid stopping it
Zoom to a specific zoom level. Any resolution constrain will apply.
Unsets a property.
Update all animations.
Generated using TypeDoc
视图对象接口