Optional
animateWhen falsy, the zoom operation will be immediate. When truthy, the zoom operation will be animated.
The default value is false.
Regardless of the value of 'animate', you have to wait for the returned Promise to resolve to ensure that the map has navigated to the target position. To alter the animation, you can assign an MapNavigatorAnimationOptions to this option.
Optional
factorThe zoom factor to multiply the map scale with.
Uniform zooming: When you assign a single, strictly positive Number to this option, that number will be used to zoom in a uniform way (the scale for all axes is multiplied with this factor). A factor larger than 1 will zoom in, a factor smaller than 1 will zoom out. Zooming with a factor of 1 will have no effect on the map.
Non-uniform zooming (non-georeferenced, 2D views only): You can use separate factors for the x- and y-axis. To achieve this, you assign an object literal to the factor option. The object literal has to have one or two properties:Optional
locationThe Point to zoom in to or out from. This point will remain fixed on the map while the scale changes. Can be a view, model or map Point. When omitted, will default to the map's view center.
Note that location
will not be moved to the center of the map!
Think of it as zooming in with the scroll wheel
on a location that is not the center of the map.
In this case, location
is the location (in pixel coordinates) of the mouse cursor.
The point under the cursor remains fixed, while the scale changes.
Optional
snapIndicates whether or not the target zoom level should be snapped to layer scale levels, to allow for pixel-perfect display of raster layers. Only has effect on 2D maps. Note that this flag has an effect on the target zoom level of the zoom operation. When omitted, this defaults to defaults.snapToScaleLevels.
Optional
targetThe target scale of the zoom operation.
Uniform zooming: When you assign a single, strictly positive Number to this option, that number will be used to zoom in a uniform way (the scale for all axes is set to this value). After the zoom operation, map.MapScale will equal this value. See map.MapScale for additional details on map scales.
Non-uniform zooming (non-georeferenced, 2D views only): You can use separate scales for the x- and y-axis. To achieve this, you assign an object literal to the targetScale option. The object literal has to have one or two properties:
The options for a zoom operation.