NavigationViewProps
type NavigationViewProps = object;
Defined in: src/NavigationView.tsx:34
Props of NavigationView. Pass either route or waypoints.
Properties
| Property | Type | Description |
|---|---|---|
mute? | boolean | Mutes voice instructions. The view's own mute button also toggles them. |
nightStyleURL? | string | Map style at night, i.e. while the system is in dark mode. Defaults to styleURL if that's set, else to Mapbox Standard with its night light preset. |
onArrive? | (event: ArriveEvent) => void | Same event as Navigation.addArriveListener. |
onCancel? | () => void | The user ended the trip; guidance has stopped. Unmount the view. |
onError? | (error: NavigationViewError) => void | The route request or the start of guidance failed. |
onRouteProgress? | (event: RouteProgressEvent) => void | Same event as Navigation.addRouteProgressListener. |
route? | Route | Route from requestRoutes. Keep it unreleased while it's passed to the view. |
simulate? | boolean | Drive the route with simulated locations. Read when guidance starts. |
style? | StyleProp<ViewStyle> | - |
styleURL? | string | Map style by day. Defaults to Mapbox Standard. |
testID? | string | - |
waypoints? | Waypoint[] | Used when route isn't set: the view requests a route through them, origin first, with alternatives, and releases it on unmount. |