TileStore class final
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.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
allTileRegions(
) → Future< List< TileRegion> > - Fetch the array of the existing tile regions.
-
estimateTileRegion(
String id, TileRegionLoadOptions loadOptions, TileRegionEstimateOptions? estimateOptions, OnTileRegionEstimateProgressListenter? progressListener) → Future< TileRegionEstimateResult> - Estimates the storage and transfer size of a tile region.
-
loadTileRegion(
String id, TileRegionLoadOptions loadOptions, OnTileRegionLoadProgressListener? progressListener) → Future< TileRegion> - Loads a new tile region or updates the existing one.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeRegion(
String id) → Future< TileRegion> - On successful tile region removal, this will complete with the removed tile region. Otherwise, this will complete with an error. @param id: The tile region id.
-
setDiskQuota(
int? quota, {TileDataDomain? domain = null}) → void - Sets the maximum amount of bytes TileStore can use to store files. If the new value causes the quota to be exceed, request will fail and data will be evicted to enforce the quota. Accepts a (positive) number of bytes, or null for resetting to the default value.
-
setMapboxAPIUrl(
Uri? url, {TileDataDomain? domain = null}) → void - Sets the base URL to use for requests to the Mapbox API. Defaults to "https://api.mapbox.com". Accepts a string, or null for resetting to the default value.
-
setTileUrlTemplate(
String? template, {TileDataDomain? domain = null}) → void - Sets the URL template for making tile requests. Defaults to the Mapbox API endpoints. Accepts a string, or null for resetting to the default value.
-
tileRegion(
String id) → Future< TileRegion> - Returns a tile region given its id.
-
tileRegionContainsDescriptor(
String id, List< TilesetDescriptorOptions> options) → Future<bool> - Checks if a tile region with the given id contains all tilesets from all of the given tileset descriptors.
-
tileRegionMetadata(
String id) → Future< Map< String, Object> > - Fetch a tile region's associated metadata
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
createAt(
Uri filePath) → Future< TileStore> -
Returns a shared TileStore at the given storage
filePath
. If the given path is empty, the tile store at the default location is returned. On iOS, this storage path is excluded from automatic cloud backup. @param filePath: The path on disk where tiles and metadata will be stored. -
createDefault(
) → Future< TileStore> - Returns a shared TileStore at the default location. See TileStore.createAt