OfflineManager

The offline manager is the main entry point for offline-related functionality.

It'll help you list and create offline regions.

Types

Link copied to clipboard
object Companion
Link copied to clipboard

This callback receives an asynchronous response containing the newly created OfflineRegion in the database or an error message otherwise.

Link copied to clipboard

This callback receives an asynchronous response indicating if an operation has succeeded or failed.

Link copied to clipboard

This callback receives an asynchronous response containing the OfflineRegion in the database or an error message otherwise.

Link copied to clipboard

This callback receives an asynchronous response containing a list of all OfflineRegion in the database or an error message otherwise.

Link copied to clipboard

This callback receives an asynchronous response containing a list of all OfflineRegion added to the database during the merge.

Functions

Link copied to clipboard

Erase resources from the ambient cache, freeing storage space.

Link copied to clipboard

Creates an offline region in the database by downloading the resources needed to use the given region offline.

Link copied to clipboard

Retrieve given region in the offline database.

Link copied to clipboard

Forces re-validation of the ambient cache.

Link copied to clipboard

Retrieve all regions in the offline database.

Link copied to clipboard

Merge offline regions from a secondary database into the main offline database.

Link copied to clipboard

Packs the existing database file into a minimal amount of disk space.

Link copied to clipboard
external fun putResourceWithUrl(url: String?, data: ByteArray?, modified: Long, expires: Long, etag: String?, mustRevalidate: Boolean)

Insert the provided resource into the ambient cache This method mimics the caching that would take place if the equivalent resource were requested in the process of map rendering. Use this method to pre-warm the cache with resources you know will be requested.

Link copied to clipboard

Delete existing database and re-initialize.

Link copied to clipboard
external fun runPackDatabaseAutomatically(autopack: Boolean)

Sets whether database file packing occurs automatically. By default, the automatic database file packing is enabled.

Link copied to clipboard

Sets the maximum size in bytes for the ambient cache.

Link copied to clipboard

Sets the maximum number of tiles that may be downloaded and stored on the current device. By default, the limit is set to 6,000.