AnimationOptions
AnimationOptions =
object
Defined in: src/ui/camera.ts:206
Options common to map movement methods that involve animation, such as Map.panBy and Map.easeTo, controlling the duration and easing function of the animation. All properties are optional.
Properties
animate?
optionalanimate:boolean
Defined in: src/ui/camera.ts:223
If false, no animation will occur.
duration?
optionalduration:number
Defined in: src/ui/camera.ts:210
The animation's duration, measured in milliseconds.
easing()?
optionaleasing: (_:number) =>number
Defined in: src/ui/camera.ts:215
A function taking a time in the range 0..1 and returning a number where 0 is the initial state and 1 is the final state.
Parameters
| Parameter | Type |
|---|---|
_ |
number |
Returns
number
essential?
optionalessential:boolean
Defined in: src/ui/camera.ts:228
If true, then the animation is considered essential and will not be affected by
prefers-reduced-motion.
freezeElevation?
optionalfreezeElevation:boolean
Defined in: src/ui/camera.ts:234
Default false. Needed in 3D maps to let the camera stay in a constant height based on sea-level. After the animation finished the zoom-level will be recalculated in respect of the distance from the camera to the center-coordinate-altitude.
offset?
optionaloffset:PointLike
Defined in: src/ui/camera.ts:219
of the target center relative to real map container center at the end of animation.