NavigationSettings
public class NavigationSettings
Global settings that are used across the SDK for altering navigation behavior.
Some properties listed in StoredProperty are stored in UserDefaults.standard.
To specify criteria when calculating routes, use the NavigationRouteOptions class.
To customize the user experience during a particular turn-by-turn navigation session, use the NavigationOptions class
when initializing a NavigationViewController.
To customize some global defaults use NavigationSettings.initialize(directions:tileStoreConfiguration:) method.
-
Default
Directionsinstance. By default,Directions.sharedis used.You can override this property by using
NavigationSettings.initialize(directions:tileStoreConfiguration:)method.Declaration
Swift
public var directions: Directions { get } -
Global
TileStoreConfigurationinstance.You can override this property by using
NavigationSettings.initialize(directions:tileStoreConfiguration:)method.Declaration
Swift
public var tileStoreConfiguration: TileStoreConfiguration { get } -
Initializes the settings with custom instances of globally used types.
If you don’t provide custom values, they will be initialized with the defaults.
Important
If you want to use this method, it should be the first method you use from Navigation SDK. Not doing so will lead to undefined behavior.
Declaration
Swift
public func initialize(directions: Directions, tileStoreConfiguration: TileStoreConfiguration)Parameters
directionsDefault
Directionsinstance. Some types allow you to customize the directions instance and fall back to theNavigationSettings.directionsby default.tileStoreConfigurationOptions for configuring how map and navigation tiles are stored on the device. See
TileStoreConfigurationfor more details. -
The volume that the voice controller will use.
This volume is relative to the system’s volume where 1.0 is same volume as the system.
Declaration
Swift
public dynamic var voiceVolume: Float { get set } -
Specifies whether to mute the voice controller or not.
Declaration
Swift
public dynamic var voiceMuted: Bool { get set } -
Specifies the preferred distance measurement unit. Meters and feet will be used when the presented distances are small enough. See
DistanceFormatterfor more information.Declaration
Swift
public dynamic var distanceUnit: LengthFormatter.Unit { get set } -
The shared navigation settings object that affects the entire application.
Declaration
Swift
public static let shared: NavigationSettings
Install in Dash
NavigationSettings Class Reference