requestResource
abstract fun requestResource(uri: Uri, allowCaching: Boolean, listener: DataProviderListener): AutoCloseable
Request a resource with a particular URI and caching option.
Return
An instance of AutoCloseable. The AutoCloseable.close will be called when the user of the data provider has no longer interested in the resource.
Note: Every implementation of DataProvider should be thread-safe.
Parameters
uri
The Uri of the resource.
allowCaching
Specifies whether the resource should be cached for future calls.
listener
The object which will be called when the data is successfully gathered or failed to be retrieved. Callbacks will occur the first time the tile data is available and subsequent times when the tile data is changed.