loadStylePack

Loads a new style package or updates the existing one. If a style package with the given id already exists, it gets updated with the values provided to the given load options. The missing resources get loaded and the expired resources get updated. If there no values provided to the given load options, the existing style package gets refreshed: the missing resources get loaded and the expired resources get updated. A failed load request can be reattempted with another loadStylePack() call. If the style cannot be fetched for any reason, the load request is terminated. If the style is fetched but loading some of the style package resources fails, the load request proceeds trying to load the remaining style package resources.

Return

A `cancelable` object that could be used to cancel the load request.

Parameters

loadOptions

The `style pack load options`.

onFinished

The callback that is invoked only once upon success, failure, or cancelation of the loading operation.

onProgress

The callback that may be invoked multiple times to report progess of the loading operation.

styleURI

The URI of the style package's associated style

open fun loadStylePack(styleURI: String, loadOptions: StylePackLoadOptions, onProgress: StylePackLoadProgressCallback, onFinished: StylePackCallback): Cancelable

An overloaded version that does not report progess of the loading operation.

Return

A `cancelable` object that could be used to cancel the load request.

Parameters

loadOptions

The `style pack load options`.

onFinished

The callback that is invoked only once upon success, failure, or cancelation of the loading operation.

styleURI

The URI of the style package's associated style

open fun loadStylePack(styleURI: String, loadOptions: StylePackLoadOptions, onFinished: StylePackCallback): Cancelable