Configuration
public struct Configuration
The configuration used to set up Navigation SDK to work in offline mode.
This configuration offers two setup options:
- Basic configuration: Sets up the Navigation SDK with essential navigation components.
- Advanced configuration: Includes essential navigation and additional components for advanced use cases. The advanced configuration allows for extensive customization of individual navigation engines and components. Using the advanced configuration and setting default engines is equivalent to using the basic constructor.
-
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
NDSStoreobject that is used to provide offline map data to the navigation engines.locationProviderInforms navigation of location updates.
routePlannerUsed by
RouteReplanningEngineto update the activeRoutePlanor to replan after a deviation. If a customRouteReplanningEngineis specified in the configuration, this parameter will be ignored.vehicleProviderEnables navigation to listen to the changes of the vehicle state. Information from
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 theroutePlanningOptionswhether at the navigation start, or during any subsequent automatic or manual route replanning events. If it’s not provided, an instance created byVehicleProviderFactory/createis used.betterProposalAcceptanceModeSpecifies how better route proposals are applied during navigation. If it’s not provided, the mode is set to
automatic.deviationReplanningMode -
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
NdsStoreobject that is used to provide offline map data to the navigation engines. AndNdsMapUpdaterimplementation that will update the givenNdsStorewith the areas of interest (for example: current position) that navigation provides.locationProviderInforms navigation of location updates.
routePlannerUsed by
RouteReplanningEngineto update the activeRoutePlanor to replan after a deviation. If a customRouteReplanningEngineis specified in the configuration, this parameter will be ignored.vehicleProviderEnables navigation to listen to the changes of the vehicle state. Information from
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 theroutePlanningOptionswhether at the navigation start, or during any subsequent automatic or manual route replanning events. If it’s not provided, an instance created byVehicleProviderFactory/createis used.betterProposalAcceptanceModeSpecifies how better route proposals are applied during navigation. If it’s not provided, the mode is set to
automatic.deviationReplanningModereplanningRetryPolicySpecifies how to handle requests which failed during replanning of a Route. If it’s not provided, an instance of
ReplanningRetryPolicyFactory/createis used.routeReplanningEngineEngine responsible for replanning a route during navigation. If it’s not provided, an instance of
RouteReplanningEngineFactory/createis used, withRouteReplannercreated fromOfflineRouteReplannerFactory/create.dataStoreMaintenanceEngineEngine responsible for instantiating updates of the data store. If it’s not provided, an instance created by
DefaultDataStoreMaintenanceEngineFactory/createis used.guidanceEngineEngine responsible for generating guidance instructions of the upcoming road maneuvers. If it’s not provided, an instance created by
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
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
OfflineMapMatchingEngineFactory/createis used.routeTrackingEngineEngine responsible for detecting whether the routes are being followed. If not provided the default implementation of
RouteTrackingEngineis used.routeProgressEngineEngine responsible for determining the progress made along the current route. If it’s not provided, an instance created by
RouteProgressEngineFactory/createis used.arrivalDetectionEngineEngine responsible for deciding if the route’s destination has been reached. If it’s not provided, an instance created by
ArrivalDetectionEngineFactory/createis used.safetyLocationsConfigurationConfiguration parameters for safety location data sources. If no configuration is specified, the horizon will not contain any
SafetyLocationElement. If a customHorizonEngineis 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
HazardElement. If a customHorizonEngineis specified in the configuration, this parameter will be ignored.
TomTom SDK for iOS (0.71.1)
Configuration