NavigationConfigurationBuilder
public class NavigationConfigurationBuilder
A builder that helps to construct NavigationConfiguration
object.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Creates a configuration builder with the specified navigation key, location provider and route replanner.
Declaration
Swift
public init( apiKey: String, locationProvider: LocationProvider, routeReplanner: TomTomSDKRouteReplanner.RouteReplanner )
Parameters
apiKey
API key used to access the navigation services.
locationProvider
LocationProvider
that will be used by navigationrouteReplanner
Route replanner to be used when replanning.
-
Specifies a custom api path
URLComponents
that will be used by navigation.Declaration
Swift
public func with(apiPath: URLComponents) -> NavigationConfigurationBuilder
Parameters
apiPath
Configuration parameters for the navigation service.
-
Specifies a custom
MapMatchingEngine
that will be used by navigation.Declaration
Swift
public func with(mapMatchingEngine: MapMatchingEngine) -> NavigationConfigurationBuilder
Parameters
mapMatchingEngine
Custom
MapMatchingEngine
that will be used by navigation. -
Specifies a custom
RouteProgressDetectionEngine
that will be used by navigation.Declaration
Swift
public func with(routeProgressEngine: RouteProgressDetectionEngine) -> NavigationConfigurationBuilder
Parameters
routeProgressEngine
Custom
RouteProgressDetectionEngine
that will be used by navigation. -
Specifies a custom
GuidanceEngine
that will be used by navigation.The SDK provides the following engines that may be passed to this method:
Declaration
Swift
public func with(guidanceEngine: GuidanceEngine) -> NavigationConfigurationBuilder
Parameters
guidanceEngine
Custom
GuidanceEngine
that will be used by navigation. -
Specifies a custom
RouteTrackingEngine
that will be used by navigation.Declaration
Swift
public func with(routeTrackingEngine: RouteTrackingEngine) -> NavigationConfigurationBuilder
Parameters
routeTrackingEngine
Custom
RouteTrackingEngine
that will be used by navigation. -
Specifies a custom
ArrivalDetectionEngine
that will be used by navigation.Declaration
Swift
public func with(arrivalDetectionEngine: ArrivalDetectionEngine) -> NavigationConfigurationBuilder
Parameters
arrivalDetectionEngine
Custom
ArrivalDetectionEngine
that will be used by navigation. -
Specifies a custom
LocationContextDetectionEngine
that will be used by navigationDeclaration
Swift
public func with(locationContextDetectionEngine: LocationContextDetectionEngine) -> NavigationConfigurationBuilder
Parameters
locationContextDetectionEngine
Custom
LocationContextDetectionEngine
that will be used by navigation. -
Specifies a custom
RouteReplanningEngine
that will be used by navigationDeclaration
Swift
public func with(routeReplanningEngine: RouteReplanningEngine) -> NavigationConfigurationBuilder
Parameters
routeReplanningEngine
Custom
RouteReplanningEngine
that will be used by navigation. -
Specifies a custom
ReplanningRetryPolicy
to be used by navigation to decide if a failed replan should be retried.Declaration
Swift
public func with(routeReplanningRetryPolicy: ReplanningRetryPolicy) -> NavigationConfigurationBuilder
Parameters
routeReplanningRetryPolicy
Custom
ReplanningRetryPolicy
that will be used by navigation. -
Specifies a custom
ReplanningRetryPolicy
to be used by navigation to decide if a failed deviation replan should be retried.Declaration
Swift
public func with(routeDeviationReplanningRetryPolicy: ReplanningRetryPolicy) -> NavigationConfigurationBuilder
Parameters
routeReplanningRetryPolicy
Custom
ReplanningRetryPolicy
that will be used by navigation. -
Specifies a custom
ContinuousReplanningMode
that will be used by navigation.Declaration
Swift
public func with(routeReplanningMode: ContinuousReplanningMode) -> NavigationConfigurationBuilder
-
Specifies if
RouteReplanningEngine
should try to replan aRoutePlan
after deviation.Declaration
Swift
public func with(deviationReplanningMode: DeviationReplanningMode) -> NavigationConfigurationBuilder
Parameters
isReplanningOnDeviationEnabled
Flag specifying if automatic route replanning after deviation should be enabled.
-
Creates the configuration based on the parameters passed to the builder.
If some parameters are not provided before invoking this method, then a configuration object is initialized with default values.
Tip
Default tables.
New navigation processing | Parameter | Type | |—————————-|————————————————————| |
mapMatching
| Internal type. | |routeProgress
|StandaloneRouteProgressEngine
| |guidance
|TomTomGuidanceEngine
| |routeTracking
| Internal type. | |arrivalDetection
|TomTomArrivalDetectionEngine
| |locationContextDetection
| Internal type. | |routeReplanning
|TomTomRouteReplanningEngine
|Primary navigation processing | Parameter | Type | |—————————-|————————————–| |
mapMatching
|DefaultMapMatchingEngine
| |routeProgress
|NavKitRouteProgressDetectionEngine
| |guidance
|TomTomGuidanceEngine
| |routeTracking
|NavKitRouteTrackingEngine
| |arrivalDetection
|TomTomArrivalDetectionEngine
| |locationContextDetection
|NavKitLocationContextEngine
| |routeReplanning
|TomTomRouteReplanningEngine
|
Declaration
Swift
public func build() -> NavigationConfiguration
Return Value
Configuration object that can be used to initialize
Navigation
.