MapDownloader class abstract
A class for downloading and managing map data for various regions worldwide.
Downloaded map data is permanently stored on disk, enabling maps at all zoom levels, search, routing, and other features without an active data connection. Users can query available regions, download them to disk, or delete them. An instance of this class can be created using MapDownloader.fromSdkEngineAsync.
The storage path for downloaded maps can be specified via SDKOptions.persistentMapStoragePath.
To control the type of content included in a map download, use LayerConfiguration.
Once applied, it affects both the map cache and offline maps.
Satellite-based map schemes are not included in the downloaded region data.
Note:
During turn-by-turn navigation,
while a map download or update is in progress, navigation may not function as expected,
and the app may be blocked until the operation is completed.
Ensure that all pending map operations are finished before starting navigation.
This applies only to MapDownloader and MapUpdater. RoutePrefetcher operations are not affected.
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
Methods
-
clearPersistentMapStorage(
SDKCacheCallback callback) → void - Performs an asynchronous operation to clear the persistent map storage from all data.
-
deleteRegions(
List< RegionId> regions, DeletedRegionsCallback callback) → void - Performs an asynchronous operation to delete map data for regions specified by a list of RegionId.
-
downloadArea(
GeoPolygon area, DownloadRegionsStatusListener statusListener) → MapDownloaderTask - Performs an asynchronous request to download map data for area specified by a GeoPolygon.
-
downloadRegions(
List< RegionId> regions, DownloadRegionsStatusListener statusListener) → MapDownloaderTask - Performs an asynchronous request to download map data for regions specified by a list of RegionId instances.
-
getDownloadableRegions(
DownloadableRegionsCallback callback) → TaskHandle - Performs an asynchronous request to fetch a list of Region objects for downloading map data in a separate request.
-
getDownloadableRegionsWithLanguageCode(
LanguageCode languageCode, DownloadableRegionsCallback callback) → TaskHandle -
Performs an asynchronous request to fetch a list of Region objects with Region.name
in given
MapDownloader.getDownloadableRegionsWithLanguageCode.languageCode, that can be used to download the actual map data in a separate request. -
getInitialPersistentMapStatus(
) → PersistentMapStatus - Gets the initial status of the already downloaded regions at start-up time of the app.
-
getInstalledRegions(
) → List< InstalledRegion> - Method to get a list of map regions that are currently installed on the device.
-
getOfflineMapsStorageSizeInBytes(
) → int - Get the total size of all downloaded regions currently persisted on disk at the location that is specified via SDKOptions.persistentMapStoragePath.
-
getOfflineMapsStorageSizeInBytesAsync(
OfflineStorageSizeCallback callback) → TaskHandle - Get the total size of all downloaded regions currently persisted on disk at the location that is specified via SDKOptions.persistentMapStoragePath.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
repairPersistentMap(
RepairPersistentMapCallback callback) → void - Tries to repair already downloaded regions that are in a corrupted state (see MapDownloader.getInitialPersistentMapStatus).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromSdkEngineAsync(
SDKNativeEngine sdkEngine, MapDownloaderConstructionCallback mapDownloaderConstructionCallback) → void - Gets a single instance of this class per provided SDKNativeEngine.