-
A navigation service coordinates various nonvisual components that track the user as they navigate along a predetermined route. You use
MapboxNavigationService, which conforms to this protocol, either as part ofNavigationViewControlleror by itself as part of a custom user interface. A navigation service calls methods on itsdelegate, which conforms to theNavigationServiceDelegateprotocol, whenever significant events or decision points occur along the route.A navigation service controls a
NavigationLocationManagerfor determining the user’s location, aRouterthat tracks the user’s progress along the route, aDirectionsservice for calculating new routes (only used when rerouting), and aNavigationEventsManagerfor sending telemetry events related to navigation or user feedback.NavigationViewControllercomes with aMapboxNavigationServiceby default. You may override it to customize theDirectionsservice or simulation mode. After creating the navigation service, pass it intoNavigationOptions(styles:navigationService:voiceController:topBanner:bottomBanner:), then pass that object intoNavigationViewController(for:options:).If you use a navigation service by itself, outside of
See moreNavigationViewController, callstart()when the user is ready to begin navigating along the route. -
A concrete implementation of the
NavigationServiceprotocol.NavigationViewControllercomes with aMapboxNavigationServiceby default. You may override it to customize theDirectionsservice or simulation mode. After creating the navigation service, pass it intoNavigationOptions(styles:navigationService:voiceController:topBanner:bottomBanner:), then pass that object intoNavigationViewController(for:options:).If you use a navigation service by itself, outside of
See moreNavigationViewController, callstart()when the user is ready to begin navigating along the route.Declaration
Swift
-
A
RouteControllertracks the user’s progress along a route, posting notifications as the user reaches significant points along the route. On every location update, the route controller evaluates the user’s location, determining whether the user remains on the route. If not, the route controller calculates a new route.
See moreRouteControlleris responsible for the core navigation logic whereasNavigationViewControlleris responsible for displaying a default drop-in navigation UI.Declaration
Swift
-
See moreRouteProgressstores the user’s progress along a route. -
See moreRouteLegProgressstores the user’s progress along a route leg.Declaration
Swift
-
See moreRouteStepProgressstores the user’s progress along a route step.
Install in Dash
Core Navigation Logic Reference