Creates a new FollowPathAnimationController.
The map display instance.
Array of GeoJSON coordinates representing the path.
Optional Animation options
Optionalaltitude?: numberAdditional altitude in meters to add to the path (for camera elevation).
OptionalautoRotate?: booleanIf true, the camera automatically rotates to follow the path.
Optionalduration?: numberduration of the animation in milliseconds. Ignored if speed is set.
OptionalheadingSmoothing?: numberControls how quickly the camera's heading (bearing) follows the path direction.
Range: 0 to 1.
0 — No smoothing. Camera instantly snaps to path bearing; turns appear abrupt.1 — Maximum smoothing. Camera rotates very slowly; turns appear smooth but delayed.0 < x < 1 — Partial smoothing. Higher values = slower, smoother rotation; lower values = faster, more responsive rotation.Recommended values are between 0.8 and 0.99 for a good balance of responsiveness and smoothness.
Optionalloop?: booleanWhether the animation should loop upon completion.
Optionalpitch?: numberCamera pitch angle in degrees (0 = top-down, 90 = side view).
Optionalspeed?: numberAnimation speed in meters per second (m/s).
Cancel the animation.
Returns a promise that resolves when the animation completes.
ProtectedframeInternal frame handler. Calls updateFrame(t) which should be implemented by subclasses.
Check if the animation is running.
Set a callback to be invoked when the animation completes.
Pause the animation.
Resume a paused animation.
Start or restart the animation.
ProtectedupdateOverride this in subclasses to implement animation logic.
normalized time [0..1] after easing
Animation controller for following a path on the map. Interpolates position, altitude, and bearing along a given GeoJSON coordinate array Handles speed, auto-rotation, pitch, camera offset, and heading smoothing.
Example: