Turn-by-turn navigation
@mountaya/elements/navigation tells a traveller what to do next, how far is left, and when they leave the route. It draws nothing and makes no request of its own. The position and the voice come from your app.
readItineraryRoute joins an itinerary's segments into one route to follow:
Each step says what to do where it starts: turn left, keep right, reach a waypoint.
NavigationEngine asks your route source for a route, then follows it:
Call stop() when the traveller stops, and dispose() when the screen goes away.
The SDK reads no location. Once the route is held, feed it the positions your app gets, here from the browser:
In a native shell such as Capacitor or React Native, pass the positions its location plugin reports.
The SDK speaks nothing either. stepInstruction answers a key and its arguments, never a sentence, so the words are yours in every language:
The snapshot's progress says how far and how long to the next maneuver and to the arrival:
To try a screen at your desk, walk the route's own line at 10 m/s instead of the device:
Call it once the route is held, when the status is navigating. The last position reports arrived.