Skip to main content

NavigationViewProps

type NavigationViewProps = object;

Defined in: src/NavigationView.tsx:34

Props of NavigationView. Pass either route or waypoints.

Properties​

PropertyTypeDescription
mute?booleanMutes voice instructions. The view's own mute button also toggles them.
nightStyleURL?stringMap 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) => voidSame event as Navigation.addArriveListener.
onCancel?() => voidThe user ended the trip; guidance has stopped. Unmount the view.
onError?(error: NavigationViewError) => voidThe route request or the start of guidance failed.
onRouteProgress?(event: RouteProgressEvent) => voidSame event as Navigation.addRouteProgressListener.
route?RouteRoute from requestRoutes. Keep it unreleased while it's passed to the view.
simulate?booleanDrive the route with simulated locations. Read when guidance starts.
style?StyleProp<ViewStyle>-
styleURL?stringMap 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.