Configuration
public struct Configuration
The configuration used to set up Navigation SDK to work in offline mode.
-
init(locationProvider:
routeReplanner: ndsMapContext: mapMatchingEngine: horizonEngine: routeTrackingEngine: dataStoreMaintenanceEngine: guidanceEngine: arrivalDetectionEngine: routeProgressEngine: routeReplanningEngine: routeReplanningRetryPolicy: routeDeviationReplanningRetryPolicy: betterProposalAcceptanceMode: deviationReplanningMode: vehicleProvider: safetyLocationsConfiguration: hazardsConfiguration: ) The configuration to set up Navigation SDK for offline mode.
Declaration
Swift
public init( locationProvider: LocationProvider, routeReplanner: TomTomSDKRouteReplanner.RouteReplanner, ndsMapContext: NDSMapContext, mapMatchingEngine: MapMatchingEngine? = nil, horizonEngine: HorizonEngine? = nil, routeTrackingEngine: RouteTrackingEngine? = nil, dataStoreMaintenanceEngine: DataStoreMaintenanceEngine? = nil, guidanceEngine: GuidanceEngine = TomTomDynamicGuidanceEngine(), arrivalDetectionEngine: ArrivalDetectionEngine = TomTomArrivalDetectionEngine(), routeProgressEngine: RouteProgressEngine = StandaloneRouteProgressEngine(), routeReplanningEngine: RouteReplanningEngine = TomTomRouteReplanningEngine(), routeReplanningRetryPolicy: ReplanningRetryPolicy = ReplanningRetryPolicyFactory.create(), routeDeviationReplanningRetryPolicy: ReplanningRetryPolicy = ReplanningRetryPolicyFactory.create(), betterProposalAcceptanceMode: BetterProposalAcceptanceMode = .automatic, deviationReplanningMode: DeviationReplanningMode = .automatic, vehicleProvider: VehicleProvider = VehicleProviderFactory.create(), safetyLocationsConfiguration: SafetyLocationsConfiguration? = nil, hazardsConfiguration: HazardsConfiguration? = nil )
Parameters
locationProvider
The default
LocationProvider
during navigation.routeReplanner
Used while instantiating a default
RouteReplanningEngine
.ndsMapContext
Offline data store and its updater used during initialization of navigation engines.
mapMatchingEngine
The default
MapMatchingEngine
during navigation. If not provided, an instance created byOfflineMapMatchingEngineFactory
is used.horizonEngine
The default
HorizonEngine
during navigation. If not provided, an instance created byOfflineHorizonEngineFactory
is used.routeTrackingEngine
The default
RouteTrackingEngine
during navigation. If not provided, an instance ofDefaultRouteTrackingEngine
is used.dataStoreMaintenanceEngine
Engine that updates the data store. If not provided, and
ndsMapContext.updater
argument is notnil
, an instance created byDefaultDataStoreMaintenanceEngineFactory
is used.guidanceEngine
The default
GuidanceEngine
during navigation. If not provided, an instance ofTomTomDynamicGuidanceEngine
is used.arrivalDetectionEngine
The default
ArrivalDetectionEngine
during navigation. If not provided, an instance ofTomTomArrivalDetectionEngine
is used.routeProgressEngine
The default [RouteProgressEngine] during navigation. If not provided, an instance of
StandaloneRouteProgressEngine
is used.routeReplanningEngine
The default
RouteReplanningEngine
during navigation. If not provided, an instance ofTomTomRouteReplanningEngine
is used.routeReplanningRetryPolicy
The default
ReplanningRetryPolicy
during navigation. If not provided, an instance ofDefaultReplanningRetryPolicy
is used.routeDeviationReplanningRetryPolicy
The default
ReplanningRetryPolicy
during navigation. If not provided, an instance ofDefaultReplanningRetryPolicy
is used.betterProposalAcceptanceMode
The default
BetterProposalAcceptanceMode
during navigation. If not provided, the mode is set toBetterProposalAcceptanceMode.automatic
.deviationReplanningMode
Defines whether
RouteReplanningEngine
should try replanning the activeRoutePlan
after deviation. If not provided, the deviation replanning mode is set toDeviationReplanningMode.Automatic
.vehicleProvider
The default
VehicleProvider
during navigation. If not provided, an instance created byVehicleProviderFactory.create
is used.safetyLocationsConfiguration
Configuration parameters for safety location data sources. If no configuration is specified, the horizon will not contain any
SafetyLocationElement
. This parameter is ignored if a customHorizonEngine
is specified in the configuration.hazardsConfiguration
Configuration parameters for hazard data sources. If no configuration is specified, the horizon will not contain any
HazardElement
. This parameter is ignored if a customHorizonEngine
is specified in the configuration.