Creates a new FollowPathAnimationController.
The map display instance.
Array of GeoJSON coordinates representing the path.
Optional Animation options
Additional altitude in meters to add to the path (for camera elevation).
If true, the camera automatically rotates to follow the path.
duration of the animation in milliseconds. Ignored if speed
is set.
Controls 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.
Whether the animation should loop upon completion.
Camera pitch angle in degrees (0 = top-down, 90 = side view).
Animation speed in meters per second (m/s).
Cancel the animation.
Returns a promise that resolves when the animation completes.
Internal 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.
Override this in subclasses to implement animation logic.
normalized time [0..1] after easing
Generated using TypeDoc
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:
import {FollowPathAnimationController} from '@here/xyz-maps-display'; const path: GeoJSONCoordinate[] = [ [13.405, 52.52], [13.406, 52.521], [13.407, 52.522] ]; const controller = new FollowPathAnimationController(mapDisplay, path, { duration: 10000, // 10 seconds }); controller.start(); // In case you want to wait for the animation to complete: await controller.complete(); console.log('Animation completed');