Home > @magiclane/maps-sdk > MapDownloaderService
MapDownloaderService class
Service for downloading offline map tiles for one or more geographic areas.
Use this service to initiate downloads of map tiles for offline viewing. Manage the downloaded map data and monitor transfer statistics.
This service does not manage map data storage. Downloaded tiles cannot be used for search, navigation or routing. See the ContentStore for managing offline map data.
Maps & 3D Scenes
Signature:
export declare class MapDownloaderService extends GemAutoreleaseObject Extends: GemAutoreleaseObject
Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Creates a new MapDownloaderService instance. Use the default constructor to obtain a service instance that can start downloads and provide transfer statistics. |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
number |
Returns the maximum area size (in square kilometers) allowed for downloads. If a requested download area exceeds this value, startDownload will fail with an appropriate GemError. | ||
|
|
any | ||
|
|
TransferStatistics |
Returns transfer statistics for data exchanged by this service. Returns a TransferStatistics object containing counters and metrics about network usage performed by the traffic service. This information can be used for diagnostics or to display usage to end users. |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
Cancels an ongoing download operation. The cancellation is asynchronous; the final completion state will be reported via the progress listener's completion callback (and will typically result in GemError.cancel being delivered to the onComplete callback passed to startDownload). | ||
|
Starts downloading map tiles for the specified geographic area(s). Completion is reported through the onComplete callback with a GemError indicating the final status. If the operation cannot be started an error will be delivered to onComplete and the method returns null. |