MapDataStore
public protocol MapDataStore : PositionUpdateObserver
This protocol abstracts away access to and operations with an onboard map database.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Handler for the map data store access.
Declaration
Swift
var storeAccess: MapDataStoreAccess { get }
-
Synchronizes access to the map data.
Declaration
Swift
var sync: MapDataStoreAccessSyncing { get }
-
Enables or disables map updates.
When updates are enabled automatic update operations (including map extension and repair of unusable regions) are started, according to the configuration.
If map updates are disabled, this component will not write to the map for any reason. Automatic updates will not run. Updates that were running are safely interrupted. In such case, call to this method will block until all ongoing updates, if any, have stopped.
Note
When an update of the map is interrupted unexpectedly (e.g. power loss), the region that was being updated could become unusable.
Declaration
Swift
var updatesEnabled: Bool { get set }
Parameters
enabled
true if map updates are enabled, false otherwise.
-
Adds observer that is called when a region is successfully updated with new content.
The observer is called when a region is updated or installed (added) via an automatic or manual task. It is not called when the map is replaced.
Declaration
Swift
func addMapUpdateObserver(_ observer: MapUpdateObserver)
Parameters
observer
The observer to be registered.
-
Removes previously registered observer.
Declaration
Swift
func removeMapUpdateObserver(_ observer: MapUpdateObserver)
Parameters
observer
The registered observer.
-
Adds observer that is called when an automatic update fails due to an irrecoverable error.
Declaration
Swift
func addAutomaticMapUpdateFailureObserver(_ observer: AutomaticMapUpdateFailureObserver)
Parameters
observer
The observer to be registered.
-
Removes previously registered observer.
Declaration
Swift
func removeAutomaticMapUpdateFailureObserver(_ observer: AutomaticMapUpdateFailureObserver)
Parameters
observer
The registered observer.
-
Sets current position.
Declaration
Swift
override func setPosition(_ position: CLLocationCoordinate2D)
Parameters
position
New value for current position.
-
Sets the active route.
Note
Setting the active route triggers onboard NDS map update if along route update is enabled and the polyline differs from the previously set one.Declaration
Swift
override func setActiveRoute(_ polyline: [CLLocationCoordinate2D])
Parameters
polyline
The polyline representing the active route.