TileStore

open class TileStore

TileStore manages downloads and storage for requests to tile-related API endpoints, enforcing a disk usage quota: tiles available on disk may be deleted to make room for a new download. This interface can be used by an app developer to set the disk quota. The rest of TileStore API is intended for native SDK consumption only.

Functions

addObserver
Link copied to clipboard
open fun addObserver(observer: TileStoreObserver)
Adds a new observer to the TileStore instance.
computeCoveredArea
Link copied to clipboard
open fun computeCoveredArea(descriptors: List<TilesetDescriptor>, callback: TileRegionGeometryCallback)
Computes a polygon of the area covered by the tiles cached in TileStore with the specified TilesetDescriptors.
create
Link copied to clipboard
open fun create(): TileStore
Creates a TileStore instance at the default location.
open fun create(path: String): TileStore
Creates a TileStore instance for the given storage path.
getAllTileRegions
Link copied to clipboard
open fun getAllTileRegions(callback: TileRegionsCallback)
Returns a list of the existing tile regions.
getTileRegion
Link copied to clipboard
open fun getTileRegion(id: String, callback: TileRegionCallback)
Returns a tile region by its id.
getTileRegionGeometry
Link copied to clipboard
open fun getTileRegionGeometry(id: String, callback: TileRegionGeometryCallback)
Returns a tile region's associated geometry The region associated geometry is provided by the client and it represents the area, which the tile region must cover.
getTileRegionMetadata
Link copied to clipboard
open fun getTileRegionMetadata(id: String, callback: TileRegionMetadataCallback)
Returns a tile region's associated metadata The region's associated metadata that a user previously set for this region.
loadResource
Link copied to clipboard
open fun loadResource(description: ResourceDescription, options: ResourceLoadOptions, progressCallback: ResourceLoadProgressCallback, resultCallback: ResourceLoadResultCallback): Cancelable
loadTileRegion
Link copied to clipboard
open fun loadTileRegion(id: String, loadOptions: TileRegionLoadOptions): Cancelable
An overloaded version that does not report progess or finished status of the loading operation.
open fun loadTileRegion(id: String, loadOptions: TileRegionLoadOptions, onFinished: TileRegionCallback): Cancelable
An overloaded version that does not report progess of the loading operation.
open fun loadTileRegion(id: String, loadOptions: TileRegionLoadOptions, onProgress: TileRegionLoadProgressCallback, onFinished: TileRegionCallback): Cancelable
Loads a new tile region or updates the existing one.
removeObserver
Link copied to clipboard
open fun removeObserver(observer: TileStoreObserver)
Removes an existing observer from the TileStore instance.
removeTileRegion
Link copied to clipboard
open fun removeTileRegion(id: String)
Removes a tile region.
open fun removeTileRegion(id: String, callback: TileRegionCallback)
An overloaded version with a callback for feedback.
setOption
Link copied to clipboard
open fun setOption(key: String, value: Value)
Sets additional options for this instance.
open fun setOption(key: String, domain: TileDataDomain, value: Value)
Sets additional options for this instance that are specific to a data type.
tileRegionContainsDescriptors
Link copied to clipboard
open fun tileRegionContainsDescriptors(id: String, descriptors: List<TilesetDescriptor>, callback: TileRegionBooleanCallback)
Checks if a tile region with the given id contains all tilesets from all of the given tileset descriptors.