NavigationViewController
NavigationViewController
is a 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.
Seealso
CarPlayNavigationViewController-
A
Route
object constructed by MapboxDirections.In cases where you need to update the route after navigation has started you can set a new
route
here andNavigationViewController
will update its UI accordingly. -
An instance of
Directions
need for rerouting. See Mapbox Directions for further information. -
An optional
MGLMapCamera
you can use to improve the initial transition from a previous viewport and prevent a trigger from an excessive significant location update. -
An instance of
MGLAnnotation
representing the origin of your route. -
The receiver’s delegate.
-
Provides access to various speech synthesizer options.
See
RouteVoiceController
for more information. -
Provides all routing logic for the user.
See
NavigationService
for more information. -
The main map view displayed inside the view controller.
Note
Do not change this map view’s delegate. -
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. -
Toggles sending of UILocalNotification upon upcoming steps when application is in the background. Defaults to
true
. -
Shows a button that allows drivers to report feedback such as accidents, closed roads, poor instructions, etc. Defaults to
true
. -
Shows End of route Feedback UI when the route controller arrives at the final destination. Defaults to
true.
-
If true, the map style and UI will automatically be updated given the time of day.
-
If
true
,UIApplication.isIdleTimerDisabled
is set totrue
inviewWillAppear(_:)
andfalse
inviewWillDisappear(_:)
. If your application manages the idle timer itself, set this property tofalse
. -
Bool which should be set to true if a CarPlayNavigationView is also being used.
-
A Boolean value that determines whether the map annotates the locations at which instructions are spoken for debugging purposes.
-
-
-
Initializes a
NavigationViewController
that provides turn by turn navigation for the given route. A optionaldirection
object is needed for potential rerouting.See Mapbox Directions for further information.
-
-
-
-
Presents a
NavigationViewController
on the top most view controller in the window and opens up theStepsViewController
. If theNavigationViewController
is already in the stack, it will open theStepsViewController
unless it is already open. -
Dismisses a
NavigationViewController
if there is any in the navigation stack.