PredictiveCacheController

fun PredictiveCacheController(mapboxNavigation: MapboxNavigation, predictiveCacheOptions: PredictiveCacheOptions)

Constructs a new instance of the PredictiveCacheController using the provided MapboxNavigation and PredictiveCacheOptions.

Note: The lifecycle of the MapboxNavigation instance should be longer than that of the PredictiveCacheController. Specifically, MapboxNavigation should not be destroyed before PredictiveCacheController.onDestroy is called.

Parameters

mapboxNavigation

MapboxNavigation object which will be used as a source of active route

predictiveCacheOptions

PredictiveCacheOptions options to instantiate instance of PredictiveCacheController


fun PredictiveCacheController(predictiveCacheOptions: PredictiveCacheOptions)

Constructs a new instance of the PredictiveCacheController using the provided PredictiveCacheOptions. Throws IllegalStateException if MapboxNavigation was not instantiated before. Use PredictiveCacheController constructor which explicitly accepts MapboxNavigation instance.

Parameters

predictiveCacheOptions

PredictiveCacheOptions options to instantiate instance of PredictiveCacheController

Throws

if MapboxNavigation was not instantiated before