Configuration
public struct Configuration
The configuration used to set up Navigation SDK to work in offline mode.
-
init(ndsStore:locationProvider: routePlanner: vehicleProvider: betterProposalAcceptanceMode: deviationReplanningMode: ) Simple configuration used to set up Navigation SDK to work in offline mode.
Declaration
Swift
public init( ndsStore: NDSStore, locationProvider: LocationProvider, routePlanner: RoutePlanner, vehicleProvider: VehicleProvider = VehicleProviderFactory.create(), betterProposalAcceptanceMode: BetterProposalAcceptanceMode = .automatic, deviationReplanningMode: DeviationReplanningMode = .automatic )Parameters
ndsStoreThe
TomTomSDKDataManagementOffline/NDSStoreobject that is used to provide offline map data to the navigation engines.locationProviderInforms navigation of location updates.
routePlannerUsed by
TomTomSDKNavigationEngines/RouteReplanningEngineto update the activeTomTomSDKNavigationEngines/RoutePlanor to replan after a deviation. If a customTomTomSDKNavigationEngines/RouteReplanningEngineis specified in the configuration, this parameter will be ignored.vehicleProviderEnables navigation to listen to the changes of the vehicle state. Information from
TomTomSDKVehicle/VehicleProvider/vehicleis leveraged by theHorizonEngineto provide the relevant virtual horizon. Additionally, it is used as a request parameter for route replannings during the navigation session. Notably, it supersedes any vehicle information specified in theTomTomSDKNavigationEngines/RoutePlan/routePlanningOptionswhether at the navigation start, or during any subsequent automatic or manual route replanning events. If it’s not provided, an instance created byTomTomSDKVehicle/VehicleProviderFactory/createis used.betterProposalAcceptanceModeSpecifies how better route proposals are applied during navigation. If it’s not provided, the mode is set to
TomTomSDKNavigationEngines/BetterProposalAcceptanceMode/automatic.deviationReplanningModeDefines whether navigation should try to replan the active
TomTomSDKNavigationEngines/RoutePlanafter deviation. If not provided, the deviation replanning mode is set toTomTomSDKNavigationEngines/DeviationReplanningMode/automatic. -
init(ndsMapContext:locationProvider: routePlanner: vehicleProvider: betterProposalAcceptanceMode: deviationReplanningMode: replanningRetryPolicy: routeReplanningEngine: dataStoreMaintenanceEngine: guidanceEngine: horizonEngine: mapMatchingEngine: routeTrackingEngine: routeProgressEngine: arrivalDetectionEngine: safetyLocationsConfiguration: hazardsConfiguration: ) The configuration to set up Navigation SDK for offline mode.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public init( ndsMapContext: NDSMapContext, locationProvider: LocationProvider, routePlanner: RoutePlanner, vehicleProvider: VehicleProvider = VehicleProviderFactory.create(), betterProposalAcceptanceMode: BetterProposalAcceptanceMode = .automatic, deviationReplanningMode: DeviationReplanningMode = .automatic, replanningRetryPolicy: ReplanningRetryPolicy = ReplanningRetryPolicyFactory.create(), routeReplanningEngine: RouteReplanningEngine = TomTomRouteReplanningEngine(), dataStoreMaintenanceEngine: DataStoreMaintenanceEngine? = nil, guidanceEngine: GuidanceEngine = TomTomDynamicGuidanceEngine(), horizonEngine: HorizonEngine? = nil, mapMatchingEngine: MapMatchingEngine? = nil, routeTrackingEngine: RouteTrackingEngine? = nil, routeProgressEngine: RouteProgressEngine = StandaloneRouteProgressEngine(), arrivalDetectionEngine: ArrivalDetectionEngine = TomTomArrivalDetectionEngine(), safetyLocationsConfiguration: SafetyLocationsConfiguration? = nil, hazardsConfiguration: HazardsConfiguration? = nil )Parameters
ndsMapContextOffline data store and its updater used during initialization of navigation engines. It contains the
TomTomSDKDataManagementOffline/NdsStoreobject that is used to provide offline map data to the navigation engines. AndTomTomSDKDataManagementOffline/NdsMapUpdaterimplementation that will update the givenTomTomSDKDataManagementOffline/NdsStorewith the areas of interest (for example: current position) that navigation provides.locationProviderInforms navigation of location updates.
routePlannerUsed by
TomTomSDKNavigationEngines/RouteReplanningEngineto update the activeTomTomSDKNavigationEngines/RoutePlanor to replan after a deviation. If a customTomTomSDKNavigationEngines/RouteReplanningEngineis specified in the configuration, this parameter will be ignored.vehicleProviderEnables navigation to listen to the changes of the vehicle state. Information from
TomTomSDKVehicle/VehicleProvider/vehicleis leveraged by theHorizonEngineto provide the relevant virtual horizon. Additionally, it is used as a request parameter for route replannings during the navigation session. Notably, it supersedes any vehicle information specified in theRoutePlan.routePlanningOptionswhether at the navigation start, or during any subsequent automatic or manual route replanning events. If it’s not provided, an instance created byTomTomSDKVehicle/VehicleProviderFactory/createis used.betterProposalAcceptanceModeSpecifies how better route proposals are applied during navigation. If it’s not provided, the mode is set to
TomTomSDKNavigationEngines/BetterProposalAcceptanceMode/automatic.deviationReplanningModeDefines whether navigation should try to replan the active
TomTomSDKNavigationEngines/RoutePlanafter deviation. If not provided, the deviation replanning mode is set toTomTomSDKNavigationEngines/DeviationReplanningMode/automatic.replanningRetryPolicySpecifies how to handle requests which failed during replanning of a Route. If it’s not provided, an instance of
TomTomSDKNavigationEngines/ReplanningRetryPolicyFactory/createis used.routeReplanningEngineEngine responsible for replanning a route during navigation. If it’s not provided, an instance of
TomTomSDKNavigationEngines/RouteReplanningEngineFactory/createis used, withTomTomSDKNavigation/RouteReplannercreated fromTomTomSDKNavigationEngines/OfflineRouteReplannerFactory/create.dataStoreMaintenanceEngineEngine responsible for instantiating updates of the data store. If it’s not provided, an instance created by
TomTomSDKDataStoreMaintenanceEngine/DefaultDataStoreMaintenanceEngineFactory/createis used.guidanceEngineEngine responsible for generating guidance instructions of the upcoming road maneuvers. If it’s not provided, an instance created by
TomTomSDKNavigation/GuidanceEngineFactory/createis used.horizonEngineEngine responsible for providing location context data extending beyond the driver’s visible horizon. If it’s not provided, an instance created by
TomTomSDKHorizonEngineOffline/OfflineHorizonEngineFactory/createis used.mapMatchingEngineEngine responsible for improving position accuracy by attempting to match it to the map or the route. If it’s not provided, an instance created by
TomTomSDKMapMatchingEngineOffline/OfflineMapMatchingEngineFactory/createis used.routeTrackingEngineEngine responsible for detecting whether the routes are being followed. If it’s not provided, an instance created by
TomTomSDKNavigation/RouteTrackingEngineFactory/createis used.routeProgressEngineEngine responsible for determining the progress made along the current route. If it’s not provided, an instance created by
TomTomSDKNavigation/RouteProgressEngineFactory/createis used.arrivalDetectionEngineEngine responsible for deciding if the route’s destination has been reached. If it’s not provided, an instance created by
TomTomSDKNavigation/ArrivalDetectionEngineFactory/createis used.safetyLocationsConfigurationConfiguration parameters for safety location data sources. If no configuration is specified, the horizon will not contain any
TomTomSDKNavigationEngines/SafetyLocationElement. If a customTomTomSDKNavigationEngines/HorizonEngineis specified in the configuration, this parameter will be ignored.hazardsConfigurationConfiguration parameters for hazard data sources. If no configuration is specified, the horizon will not contain any
TomTomSDKNavigationEngines/HazardElement. If a customTomTomSDKNavigationEngines/HorizonEngineis specified in the configuration, this parameter will be ignored.
TomTom SDK for iOS (0.53.1)
Configuration