Configuration

public struct Configuration

The configuration used to set up Navigation SDK to work in offline mode.

  • 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

    ndsStore

    The TomTomSDKDataManagementOffline/NDSStore object that is used to provide offline map data to the navigation engines.

    locationProvider

    Informs navigation of location updates.

    routePlanner

    Used by TomTomSDKNavigationEngines/RouteReplanningEngine to update the active TomTomSDKNavigationEngines/RoutePlan or to replan after a deviation. If a custom TomTomSDKNavigationEngines/RouteReplanningEngine is specified in the configuration, this parameter will be ignored.

    vehicleProvider

    Enables navigation to listen to the changes of the vehicle state. Information from TomTomSDKVehicle/VehicleProvider/vehicle is leveraged by the HorizonEngine to 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 the TomTomSDKNavigationEngines/RoutePlan/routePlanningOptions whether at the navigation start, or during any subsequent automatic or manual route replanning events. If it’s not provided, an instance created by TomTomSDKVehicle/VehicleProviderFactory/create is used.

    betterProposalAcceptanceMode

    Specifies how better route proposals are applied during navigation. If it’s not provided, the mode is set to TomTomSDKNavigationEngines/BetterProposalAcceptanceMode/automatic.

    deviationReplanningMode

    Defines whether navigation should try to replan the active TomTomSDKNavigationEngines/RoutePlan after deviation. If not provided, the deviation replanning mode is set to TomTomSDKNavigationEngines/DeviationReplanningMode/automatic.

  • 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

    ndsMapContext

    Offline data store and its updater used during initialization of navigation engines. It contains the TomTomSDKDataManagementOffline/NdsStore object that is used to provide offline map data to the navigation engines. And TomTomSDKDataManagementOffline/NdsMapUpdater implementation that will update the given TomTomSDKDataManagementOffline/NdsStore with the areas of interest (for example: current position) that navigation provides.

    locationProvider

    Informs navigation of location updates.

    routePlanner

    Used by TomTomSDKNavigationEngines/RouteReplanningEngine to update the active TomTomSDKNavigationEngines/RoutePlan or to replan after a deviation. If a custom TomTomSDKNavigationEngines/RouteReplanningEngine is specified in the configuration, this parameter will be ignored.

    vehicleProvider

    Enables navigation to listen to the changes of the vehicle state. Information from TomTomSDKVehicle/VehicleProvider/vehicle is leveraged by the HorizonEngine to 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 the RoutePlan.routePlanningOptions whether at the navigation start, or during any subsequent automatic or manual route replanning events. If it’s not provided, an instance created by TomTomSDKVehicle/VehicleProviderFactory/create is used.

    betterProposalAcceptanceMode

    Specifies how better route proposals are applied during navigation. If it’s not provided, the mode is set to TomTomSDKNavigationEngines/BetterProposalAcceptanceMode/automatic.

    deviationReplanningMode

    Defines whether navigation should try to replan the active TomTomSDKNavigationEngines/RoutePlan after deviation. If not provided, the deviation replanning mode is set to TomTomSDKNavigationEngines/DeviationReplanningMode/automatic.

    replanningRetryPolicy

    Specifies how to handle requests which failed during replanning of a Route. If it’s not provided, an instance of TomTomSDKNavigationEngines/ReplanningRetryPolicyFactory/create is used.

    routeReplanningEngine

    Engine responsible for replanning a route during navigation. If it’s not provided, an instance of TomTomSDKNavigationEngines/RouteReplanningEngineFactory/create is used, with TomTomSDKNavigation/RouteReplanner created from TomTomSDKNavigationEngines/OfflineRouteReplannerFactory/create.

    dataStoreMaintenanceEngine

    Engine responsible for instantiating updates of the data store. If it’s not provided, an instance created by TomTomSDKDataStoreMaintenanceEngine/DefaultDataStoreMaintenanceEngineFactory/create is used.

    guidanceEngine

    Engine responsible for generating guidance instructions of the upcoming road maneuvers. If it’s not provided, an instance created by TomTomSDKNavigation/GuidanceEngineFactory/create is used.

    horizonEngine

    Engine responsible for providing location context data extending beyond the driver’s visible horizon. If it’s not provided, an instance created by TomTomSDKHorizonEngineOffline/OfflineHorizonEngineFactory/create is used.

    mapMatchingEngine

    Engine 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/create is used.

    routeTrackingEngine

    Engine responsible for detecting whether the routes are being followed. If it’s not provided, an instance created by TomTomSDKNavigation/RouteTrackingEngineFactory/create is used.

    routeProgressEngine

    Engine responsible for determining the progress made along the current route. If it’s not provided, an instance created by TomTomSDKNavigation/RouteProgressEngineFactory/create is used.

    arrivalDetectionEngine

    Engine responsible for deciding if the route’s destination has been reached. If it’s not provided, an instance created by TomTomSDKNavigation/ArrivalDetectionEngineFactory/create is used.

    safetyLocationsConfiguration

    Configuration parameters for safety location data sources. If no configuration is specified, the horizon will not contain any TomTomSDKNavigationEngines/SafetyLocationElement. If a custom TomTomSDKNavigationEngines/HorizonEngine is specified in the configuration, this parameter will be ignored.

    hazardsConfiguration

    Configuration parameters for hazard data sources. If no configuration is specified, the horizon will not contain any TomTomSDKNavigationEngines/HazardElement. If a custom TomTomSDKNavigationEngines/HorizonEngine is specified in the configuration, this parameter will be ignored.