NavigationViewController
public class NavigationViewController: NavigationPulleyViewController, RouteMapViewControllerDelegate
                NavigationViewController is fully featured, turn by turn navigation UI.
It provides step by step instructions, an overview of all steps for the given route and support for basic styling.
- 
                  
                  
A
Routeobject constructed by MapboxDirections.In cases where you need to update the route after navigation has started you can set a new
routehere andNavigationViewControllerwill update its UI accordingly.Declaration
Swift
public var route: Route! - 
                  
                  
An instance of
MGLAnnotationthat will be shown on on the destination of your route. The last coordinate of the route will be used if no destination is given.Declaration
Swift
public var destination: MGLAnnotation! - 
                  
                  
An instance of
Directionsneed for rerouting. See Mapbox Directions for further information.Declaration
Swift
public var directions: Directions! - 
                  
                  
An optional
MGLMapCamerayou can use to improve the initial transition from a previous viewport and prevent a trigger from an excessive significant location update.Declaration
Swift
public var pendingCamera: MGLMapCamera? - 
                  
                  
An instance of
MGLAnnotationrepresenting the origin of your route.Declaration
Swift
public var origin: MGLAnnotation? - 
                  
                  
The receiver’s delegate.
Declaration
Swift
public weak var navigationDelegate: NavigationViewControllerDelegate? - 
                  
                  
Provides access to various speech synthesizer options.
See
RouteVoiceControllerfor more information.Declaration
Swift
public var voiceController: RouteVoiceController? = RouteVoiceController() - 
                  
                  
Provides all routing logic for the user.
See
RouteControllerfor more information.Declaration
Swift
public var routeController: RouteController! - 
                  
                  
Provides access to the navigation’s
MGLMapViewwith all its styling capabilities.Note that you should not change the
mapView’s delegate.Declaration
Swift
public var mapView: MGLMapView? - 
                  
                  
Determines whether the user location annotation is moved from the raw user location reported by the device to the nearest location along the route.
By default, this property is set to
true, causing the user location annotation to be snapped to the route.Declaration
Swift
public var snapsUserLocationAnnotationToRoute = true - 
                  
                  
Toggles sending of UILocalNotification upon upcoming steps when application is in the background. Defaults to
true.Declaration
Swift
public var sendNotifications: Bool = true - 
                  
                  
Shows a button that allows drivers to report feedback such as accidents, closed roads, poor instructions, etc. Defaults to
false.Declaration
Swift
public var showsReportFeedback: Bool = false - 
                  
                  
If true, the map style and UI will automatically be updated given the time of day.
Declaration
Swift
public var automaticallyAdjustsStyleForTimeOfDay = false - 
                  
                  
Declaration
Swift
required public init?(coder aDecoder: NSCoder)Parameters
aDecoder - 
                  
                  
Declaration
Swift
required public init(contentViewController: UIViewController, drawerViewController: UIViewController)Parameters
contentViewControllerdrawerViewController - 
                  
                  
Initializes a
NavigationViewControllerthat provides turn by turn navigation for the given route. A optionaldirectionobject is needed for potential rerouting.See Mapbox Directions for further information.
Declaration
Swift
required public init(for route: Route, directions: Directions = Directions.shared, styles: [Style]? = [DayStyle(), NightStyle()], locationManager: NavigationLocationManager? = NavigationLocationManager()) 
- 
                  
                  
Declaration
Swift
public func routeController(_ routeController: RouteController, shouldRerouteFrom location: CLLocation) -> BoolParameters
routeControllerlocation - 
                  
                  
Declaration
Swift
public func routeController(_ routeController: RouteController, willRerouteFrom location: CLLocation)Parameters
routeControllerlocation - 
                  
                  
Declaration
Swift
public func routeController(_ routeController: RouteController, didRerouteAlong route: Route)Parameters
routeControllerroute - 
                  
                  
Declaration
Swift
public func routeController(_ routeController: RouteController, didFailToRerouteWith error: Error)Parameters
routeControllererror - 
                  
                  
Declaration
Swift
public func routeController(_ routeController: RouteController, didUpdate locations: [CLLocation])Parameters
routeControllerlocations - 
                  
                  
Declaration
Swift
public func routeController(_ routeController: RouteController, didDiscard location: CLLocation)Parameters
routeControllerlocation 
              Install in Dash
            
        NavigationViewController Class Reference