prefetchGeoCorridor abstract method
- GeoCorridor corridor,
- PrefetchStatusListener callback
Prefetch tiles for a given geo-corridor.
A geo-corridor can easily be created from a route with Route.geometry so navigation on this route is possible in offline cases. Please note, tiles will be saved in mutable cache so when there is not enough space to accommodate new prefetched tiles MapLoaderError.notEnoughSpace is returned. When updating mutable cache, all tiles will be unusable. Please re-download the geoCorridor again. Please also note, any route calculation may not possible on prefetched tiles.
To control list of map content features for corridor prefetch, use LayerConfiguration.enabledFeatures.
-
corridorindicatesGeoCorridorthat can be constructed from the route. -
callbackis invoked to report progress and the result of prefetch. After operation is finished, PrefetchStatusListener.onComplete is invoked on the main thread. Progress is reported by invocation of PrefetchStatusListener.onProgress on the main thread.
Returns TaskHandle. Handle that will be used to manipulate the execution of the task.
Implementation
TaskHandle prefetchGeoCorridor(GeoCorridor corridor, PrefetchStatusListener callback);