ConstAdds a circle layer to the map backed by a GeoJSON source.
Unique layer identifier.
Layer options including source ID and paint properties.
Adds a GeoJSON data source to the map.
Unique source identifier.
GeoJSON data to add.
Adds an image asset to the map style for use in symbol layers.
Unique image identifier.
HTTP/HTTPS URL or local file URI of the image.
Adds a line layer to the map backed by a GeoJSON source.
Unique layer identifier.
Layer options including source ID and paint properties.
Configures text-to-speech playback settings.
TTS options (volume, rate, engine, etc.).
DirectionsError When configuration fails.
Returns the current map-matched GPS location, if available.
Latitude/longitude, or null when no location is available.
Returns the current location permission status synchronously.
The current permission status.
Returns the current session state.
One of 'idle', 'freeDrive', or 'activeGuidance'.
Advances navigation to the next leg of a multi-leg route.
DirectionsError When advancement fails.
Pauses the current free drive session.
Pauses automatic background route refresh.
Triggers an immediate route refresh to update traffic and ETA data.
Removes a previously added image from the map style.
Image identifier to remove.
Removes a previously added layer from the map.
Layer identifier to remove.
Removes a previously added GeoJSON source from the map.
Source identifier to remove.
Requests location permission from the user.
Optionaloptions: RequestLocationPermissionOptionsPermission options (background, precise).
The resulting permission status.
DirectionsError When the request fails.
Requests routes between the given waypoints.
Routing options including waypoints, profile, and preferences.
The full Directions API response envelope.
DirectionsError When routing fails.
Resumes automatic background route refresh after a pause.
Sets the Mapbox access token. Must be called before any other method.
A valid Mapbox public access token.
Programmatically moves the map camera.
Camera target, zoom, bearing, pitch, animation duration, and padding.
Keeps the screen on (or allows it to sleep) during navigation.
true to prevent screen sleep; false to restore default.
Enables or disables route simulation (replaying route geometry instead of real GPS).
true to enable simulation.
OptionalspeedMultiplier: numberPlayback speed. Default: 1.
Starts an active guidance session from a previously returned route response.
Options including the route response and optional route index.
DirectionsError When the session cannot be started.
Starts a free drive session (passive tracking without active navigation).
Starts recording navigation history to a binary file.
Stops recording navigation history and returns the path to the recorded file.
Absolute file path to the history recording.
Stops the active navigation session and returns to idle state.
DirectionsError When stop fails.
Public API facade. Wraps the raw native module in typed, JS-ergonomic methods. Default export of the package.