Offline Region
An offline region is the basic building block for offline mobile maps. Use org.maplibre.android.offline.OfflineManager.CreateOfflineRegionCallback to create a new offline region.
Types
A region is either inactive (not downloading, but previously-downloaded resources are available for use), or active (resources are being downloaded or will be downloaded, if necessary, when network access is available).
This callback receives an asynchronous response containing a notification when an offline region has been deleted, or a String error message otherwise.
This callback receives an asynchronous response containing a notification when an offline region has been invalidated, or a String error message otherwise.
A region can have a single observer, which gets notified whenever a change to the region's status occurs.
This callback receives an asynchronous response containing the OfflineRegionStatus of the offline region, or a String error message otherwise.
This callback receives an asynchronous response containing the newly update OfflineMetadata in the database, or an error message otherwise.
Properties
Functions
Remove an offline region from the database and perform any resources evictions necessary as a result.
Retrieve the current status of the region. The query will be executed asynchronously and the results passed to the given callback which will be executed on the main thread.
Invalidate all the tiles from an offline region forcing MapLibre GL to revalidate the tiles with the server before using. This is more efficient than deleting the offline region and downloading it again because if the data on the cache matches the server, no new data gets transmitted.
When set true, the OfflineRegionObserver
will continue to deliver messages even if the region state has been set as STATE_INACTIVE (operations happen asynchronously). If set false, the client won't be notified of further messages.
Pause or resume downloading of regional resources.
Register an observer to be notified when the state of the region changes.
Update an offline region metadata from the database.