public protocol NavigationService : CLLocationManagerDelegate, ActiveNavigationEventsManagerDataSource, RouterDataSource

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 of NavigationViewController or by itself as part of a custom user interface. A navigation service calls methods on its delegate, which conforms to the NavigationServiceDelegate protocol, whenever significant events or decision points occur along the route.

A navigation service controls a NavigationLocationManager for determining the user’s location, a Router that tracks the user’s progress along the route, a MapboxRoutingProvider service for calculating new routes (only used when rerouting), and a NavigationEventsManager for sending telemetry events related to navigation or user feedback.

NavigationViewController comes with a MapboxNavigationService by default. You may override it to customize the MapboxRoutingProvider‘s source service or simulation mode. After creating the navigation service, pass it into NavigationOptions(styles:navigationService:voiceController:topBanner:bottomBanner:), then pass that object into NavigationViewController(for:options:).

If you use a navigation service by itself, outside of NavigationViewController, call start() when the user is ready to begin navigating along the route.