mergeOfflineRegions

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

When the merge is completed, or fails, the MergeOfflineRegionsCallback will be invoked on the main thread. The callback reference is strongly kept throughout the process, so it needs to be wrapped in a weak reference or released on the client side if necessary.

The secondary database may need to be upgraded to the latest schema. This is done in-place and requires write-access to the provided path. If the app's process doesn't have write-access to the provided path, the file will be copied to the temporary, internal directory for the duration of the merge.

Only resources and tiles that belong to a region will be copied over. Identical regions will be flattened into a single new region in the main database.

The operation will be aborted and MergeOfflineRegionsCallback.onError with an appropriate message will be invoked if the merge would result in the offline tile count limit being exceeded.

Merged regions may not be in a completed status if the secondary database does not contain all the tiles or resources required by the region definition.

Parameters

path

secondary database writable path

callback

completion/error callback