MapUpdater class abstract
A class for updating regions previously downloaded using the MapDownloader.
First, updates for the regions are downloaded. Once the download is complete, the update process begins, installing the new content. It is recommended to regularly call MapUpdater.retrieveCatalogsUpdateInfo to check for available updates for any downloaded regions.
If updates are available, regions can be updated asynchronously using MapUpdater.updateCatalog. The MapUpdateProgressListener provides update progress for each region.
Incremental map updates are supported, by default: Instead of downloading an entire region,
only the parts that have changed will be installed. This results in a faster update process.
MapUpdater also aligns previously downloaded content with LayerConfiguration changes made via SDKOptions.
Note that patching (also called "incremental updates") is only supported for up to 8 versions. For example, if an update started with version x.y.0 then it will be supported till x.y.8 and stopped starting with x.y.9. Usually, OCM updates are released weekly. Incremental updates will stop after 2 months and a full update is performed instead.
In case of an error, the previous map data remains available for use. It is only replaced after new map data has been successfully downloaded. Regions that fail to update must be retried in a new call. Paused updates can be resumed later.
During the update process, MapUpdater internally retries failed downloads until a timeout occurs. If this happens, it is reported via MapUpdateProgressListener.
If the user cancels the update process during the update phase, it is ignored. The update phase begins after all content has been downloaded, then the HERE SDK installs and replaces the existing regions. Cancellation is only possible during the download phase, and a successful cancellation is indicated via MapUpdateProgressListener.onComplete.
Note that a MapLoaderError.notReady occurs when the MapDownloader is used in parallel. In general, background updates are not supported explicitly, as the OS can abort background processes. In addition, the OfflineSearchEngine and the OfflineRoutingEngine cannot be used while a map update is in progress and it will be indicated by a MapLoaderError.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- taskCount ↔ int
-
The number of concurrent tasks for downloading a map.
A valid task count is between 1 to 64. When the value set is outside the valid range,
then it is clamped to a valid range:
getter/setter pair
- updateStatistics → UpdateStatistics
-
Map update statistics for the current application session.
In the event of binary updates, patches are downloaded and applied. This
property helps to determine the success or failure rate of applied patches.
Map update statistics for the ongoing session of the current application.
no setter
Methods
-
getCurrentMapVersion(
) → MapVersionHandle - Returns a handle that contains the map version of the already downloaded and installed regions.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
retrieveCatalogsUpdateInfo(
CatalogsUpdateInfoCallback callback) → TaskHandle - Retrieves information of all catalogs that have newer version available.
-
setVersionCommitPolicy(
MapUpdaterMapUpdateVersionCommitPolicy versionCommitPolicy) → void - Sets the map update version policy.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateCatalog(
CatalogUpdateInfo catalogInfo, CatalogUpdateProgressListener callback) → CatalogUpdateTask - Performs an asynchronous request for each catalog to update map data to the latest available version.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromSdkEngineAsync(
SDKNativeEngine sdkEngine, MapUpdaterConstructionCallback mapUpdaterConstructionCallback) → void - Gets a single instance of this class per provided SDKNativeEngine.