Configuration
public struct Configuration
The configuration used to set up Navigation SDK to work in online 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(navigationTileStore:
locationProvider: routePlanner: vehicleProvider: betterProposalAcceptanceMode: deviationReplanningMode: ) Simple configuration used to set up Navigation SDK to work in online mode.
Declaration
Swift
public init( navigationTileStore: NavigationTileStore, locationProvider: LocationProvider, routePlanner: RoutePlanner, vehicleProvider: VehicleProvider = VehicleProviderFactory.create(), betterProposalAcceptanceMode: BetterProposalAcceptanceMode = .automatic, deviationReplanningMode: DeviationReplanningMode = .automatic )
Parameters
navigationTileStore
Tile data store based on an online map.
locationProvider
Informs navigation of location updates.
routePlanner
Used to update the active
RoutePlan
or to replan after deviation.vehicleProvider
Enables navigation to listen to the changes of the vehicle state. If it’s not provided, an instance created by
VehicleProviderFactory/create(vehicle:observationHandler:)
is used.betterProposalAcceptanceMode
Specifies how better route proposals are applied during navigation. If it’s not provided, the mode is set to
automatic
.deviationReplanningMode
-
init(navigationTileStore:
locationProvider: routePlanner: vehicleProvider: betterProposalAcceptanceMode: deviationReplanningMode: replanningRetryPolicy: routeReplanningEngine: dataStoreMaintenanceEngine: guidanceEngine: horizonEngine: mapMatchingEngine: routeTrackingEngine: routeProgressEngine: arrivalDetectionEngine: safetyLocationsConfiguration: hazardsConfiguration: ) Advanced configuration used to set up Navigation SDK to work in online mode.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public init( navigationTileStore: NavigationTileStore, locationProvider: LocationProvider, routePlanner: RoutePlanner, vehicleProvider: VehicleProvider = VehicleProviderFactory.create(), betterProposalAcceptanceMode: BetterProposalAcceptanceMode = .automatic, deviationReplanningMode: DeviationReplanningMode = .automatic, replanningRetryPolicy: ReplanningRetryPolicy = ReplanningRetryPolicyFactory.create(), routeReplanningEngine: RouteReplanningEngine? = nil, dataStoreMaintenanceEngine: DataStoreMaintenanceEngine? = nil, guidanceEngine: GuidanceEngine? = nil, horizonEngine: HorizonEngine? = nil, mapMatchingEngine: MapMatchingEngine? = nil, routeTrackingEngine: RouteTrackingEngine? = nil, routeProgressEngine: RouteProgressEngine? = nil, arrivalDetectionEngine: ArrivalDetectionEngine? = nil, safetyLocationsConfiguration: SafetyLocationsConfiguration? = nil, hazardsConfiguration: HazardsConfiguration? = nil )
Parameters
navigationTileStore
Tile data store based on an online map.
locationProvider
Informs navigation of location updates.
routePlanner
Used by
RouteReplanningEngine
to update the activeRoutePlan
or to replan after a deviation. If a customRouteReplanningEngine
is specified in the configuration, this parameter will be ignored.vehicleProvider
Enables navigation to listen to the changes of the vehicle state. If it’s not provided, an instance created by
VehicleProviderFactory/create(vehicle:observationHandler:)
is used.betterProposalAcceptanceMode
Specifies how better route proposals are applied during navigation. If it’s not provided, the mode is set to
automatic
.deviationReplanningMode
replanningRetryPolicy
Specifies how to handle requests which failed during replanning of a
Route
. If it’s not provided, an instance ofcreate(maxRetryDelay:)
is used.routeReplanningEngine
Engine responsible for replanning a route during navigation.
nil
by default.dataStoreMaintenanceEngine
Engine responsible for instantiating updates of the data store.
nil
by default.guidanceEngine
Engine responsible for generating guidance instructions of the upcoming road maneuvers.
nil
by default.horizonEngine
Engine responsible for providing location context data extending beyond the driver’s visible horizon.
nil
by default.mapMatchingEngine
Engine responsible for improving position accuracy by attempting to match it to the map or the route.
nil
by default.routeTrackingEngine
Engine responsible for detecting whether the routes are being followed or not.
nil
by default.routeProgressEngine
Engine responsible for determining the progress made along the current route.
nil
by default.arrivalDetectionEngine
Engine responsible for deciding if the route’s destination has been reached.
nil
by default.safetyLocationsConfiguration
Configuration parameters for safety location data sources. If no configuration is specified, the horizon will not contain any
safety location elements
(SafetyLocationElement
). If a customHorizonEngine
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
hazard elements
(HazardElement
). If a customHorizonEngine
is specified in the configuration, this parameter will be ignored.