synchronizeBaseMapTiles function
Downloads the base-map tiles for every dataset that enableBaseMapCaching has been called for, one region per venue.
The dataset's venues must already be on the device, which loadMapsIndoors takes care of for the loaded solution. A download covers a whole venue and can take several minutes; calling this again for an already-cached dataset refreshes it rather than duplicating it.
onProgress reports a fraction from 0.0 to 1.0 while the download runs, ending at 1.0 on success. It is never invoked on the Google Maps flavour. Only one synchronization can run at a time - starting a second before the first completes throws a StateError.
Update frequency differs by platform: Android reports continuously through the download, while iOS reports once per cached venue region. On a five-venue solution that measured 627 updates on Android against 5 on iOS. The fraction is accurate on both, so a progress bar bound to it is correct either way - just coarser on iOS, where a single-venue solution may report nothing before the final 1.0.
On Android, destroyMapsIndoors cancels a download in flight; already-cached tiles are kept.
Returns null once every region has been cached, otherwise an MPError.
Implementation
Future<MPError?> synchronizeBaseMapTiles(
{OnBaseMapCacheProgressListener? onProgress}) =>
DataSetCachePlatform.instance.synchronizeBaseMapTiles(onProgress);