Interface: AnimationConfig
Parameters to configure the route animation.
Properties
autoFitByPlace?
true
(Optional) Configuration for automatic map fitting when the route crosses different places/buildings. When enabled, the map will automatically adjust its view to show only the steps within the current place when the route animation enters a new place. This is particularly useful for indoor navigation where routes may cross multiple buildings or floors.
enabled
true
Whether automatic fitting by place is enabled. When true, the map will automatically adjust its
bounds when the route enters a new place. Must be explicitly set to true to enable this feature.
padding?
{ top: 150, right: 150, bottom: 150, left: 150 }
(Optional) Padding in pixels to be added around the fitted bounds. If not provided, defaults to
{ top: 150, right: 150, bottom: 150, left: 150 }. Each value represents the padding for the
respective edge of the viewport.
Default Value
{ top: 150, right: 150, bottom: 150, left: 150 }
Example
{ top: 150, right: 150, bottom: 150, left: 150 }
Default Value
undefined (disabled by default for backward compatibility)
callBack()?
undefined
(Optional) A function that receive the status of the animation.
In a route animation:
- While the animation is running, this is called at the start of the animation of each step.
- When the animation es finished, this is called again a single time with
{ isFinished: true; step: null }.
In a step by step animation:
- Initially will be called with the first step to animate.
- At the end of each step animation:
- If there exist more step to animate, it will be called with the next step to animate.
- Else, it will be called with
{ isFinished: true; step: null }.
Parameters
status
The status of the animation.
Returns
void
changeFloorTime?
{ isFinished: true; step: null }
(Optional) The time in seconds to wait before changing the floor when the step is a changing floor step.
Default Value
0
iconRotationTime?
{ isFinished: true; step: null }
(Optional) The time in seconds to use in the rotation of the icon.
Default Value
0
minimumSpeed?
AnimationStatus
(Optional) The minimum speed in m/s to use in the animation. If the calculated speed for the animation of a step is less than this, this will be used for its animation.
Default Value
40
stepTime?
void
(Optional) The time in seconds to use for each step animation. If omitted, default to 3.
Default Value
3