synchronizeBaseMapTiles
Caches the map provider's own base-map tiles for every managed MPDataSetCache that has base-map tile caching enabled. Datasets without the flag are skipped.
Equivalent to synchronizeBaseMapTiles with no listener — see there for the two prerequisites, a registered provider and venues already on the device.
Caches the map provider's own base-map tiles for every managed MPDataSetCache that has base-map tile caching enabled. Datasets without the flag are skipped.
This is the base map underneath MapsIndoors — the MapsIndoors floor tiles and solution data are cached by synchronizeDataSets instead. The two are deliberately independent: base-map tiles are fetched from the map provider on this explicit trigger and on the host app's own schedule, so a slow or failed base-map download never delays or fails a dataset sync, and never affects the timing of load's ready callback. Nothing here is reported to MPDataSetCacheSyncListener.
Two things must already be in place:
- A com.mapsindoors.core.models.MPIMapProviderBaseMapCache must have been registered by the host app with setBaseMapCacheProvider; without one the call reports BASEMAP_CACHE_NOT_REGISTERED and caches nothing.
- Each dataset's venues must already be on the device. One region is cached per venue, and the venues are read from the dataset's own on-device cache. That cache is populated either by load of that solution, or by synchronizeDataSets / synchronizeDataSets. A dataset that has been added but neither loaded nor synced has no venues to cache around, and reports DATALOADER_VENUES_OFFLINE_DATA_NOT_FOUND — which is the usual case for a dataset managed for a solution other than the one currently loaded.
Returns immediately — caching runs in the background and can take minutes. Calling this again for an already-cached dataset refreshes it rather than duplicating it.
Parameters
Reports progress and completion, or null for fire-and-forget. Invoked on an arbitrary thread
Caches the map provider's own base-map tiles for the given MPDataSetCaches, as synchronizeBaseMapTiles does for every flagged dataset.
An explicit list is an explicit instruction, so — unlike the no-argument forms — this overload does not filter by isBaseMapTilesEnabled: every dataset given is cached. It mirrors synchronizeDataSets, which likewise re-checks nothing.
The prerequisites are the same as for synchronizeBaseMapTiles: a registered provider, and datasets whose venues are already on the device. Passing a dataset explicitly skips the isBaseMapTilesEnabled check, but it does not make its venues appear — a dataset that has been neither loaded nor synced still reports DATALOADER_VENUES_OFFLINE_DATA_NOT_FOUND.
One region is cached per venue the dataset is scoped to, sequentially. Overlapping calls are not serialized against each other: each reports its own progress and completion, and if they share a dataset the last one to settle wins its timestamp and size.
Completion follows the provider: this is finished when the provider has reported on every region, so a provider that stops reporting — which is what terminate does to work already in flight — leaves the operation unfinished and its listener uncalled. Re-registering a provider settles anything left over from the previous one.
Parameters
The MPDataSetCaches to cache base-map tiles for
Reports progress and completion, or null for fire-and-forget. Invoked on an arbitrary thread