NavigationOptions
@objc(MBNavigationOptions)
open class NavigationOptions : NSObject, NavigationCustomizable
Customization options for the turn-by-turn navigation user experience in a NavigationViewController
.
A navigation options object is where you place customized components that the navigation view controller uses during its lifetime, such as styles or voice controllers. You would likely use this class if you need to specify a Mapbox access token programmatically instead of in the Info.plist file.
Note
NavigationOptions
is designed to be used with the NavigationViewController
class to customize the user experience. To specify criteria when calculating routes, use the NavigationRouteOptions
class.
-
The styles that the view controller’s internal
StyleManager
object can select from for display.If this property is set to
nil
, aDayStyle
and aNightStyle
are created to be used as the view controller’s styles. This property is set tonil
by default.Declaration
Swift
@objc open var styles: [Style]?
-
The navigation service that manages navigation along the route.
Declaration
Swift
@objc open var navigationService: NavigationService?
-
The voice controller that manages the delivery of voice instructions during navigation.
Declaration
Swift
@objc open var voiceController: RouteVoiceController?
-
The view controller to embed into the bottom section of the UI.
If this property is set to
nil
, aBottomBannerViewController
is created and embedded in the UI. This property is set tonil
by default.Declaration
Swift
@objc open var bottomBanner: ContainerViewController?
-
Convienence factory-method for convenient bridging to OBJ-C.
Declaration
Swift
@objc public class func navigationOptions() -> Self