StoreStats
, accessed via FMTCStore().stats
, allows access to cached statistics, as well as retrieval of a recent tile (as an image), and the watching over changes in the store.
StoreMetadata
, accessed via FMTCStore().metadata
, allows access and control over a simple peristent storage mechanism, designed for use with custom data/properties/fields tied to the store (such as a CacheBehavior
or URL template).
Data is interpreted in key-value pair form, where both the key and value are String
s. Internally, the default backend stores it as a flat JSON structure. The metadata is stored directly on the store: if the store is deleted, it is deleted, and an exported store will retain its metadata. More advanced requirements will require use of a seperate persistance mechanism.
Remember that metadata
does not have any effect on internal logic: it is simply an auxiliary method of storing any data that might need to be kept alongside a store.
Stores contain any metadata associated with them, cached statistics, and maintain a reference to all the tiles that belong to it.
They are referenced by name, the single argument of FMTCStore
.
Ensure names of stores are consistent across every access. "Typed"/code-generated stores are not provided, to maintain flexibility.
Construction of an FMTCStore
object does not imply/infer that the underlying store has been created and is ready for use. Therefore, a store will require creation via its StoreManagement
object (accessed via FMTCStore.manage
) before it can be used.
After a store reference is constructed, the following actions can be performed with it:
StoreManagement
, accessed via FMTCStore().manage
, allows control over the store and its contents.
Management: manage
Control the store: create it, delete it, rename it, etc.
Statistics: stats
Retrieve information about the store and its contents
Metadata: metadata
Access simple persistent storage, with no direct influence on FMTC's functioning
Bulk Download: download
Prepare/plan, start, and manage bulk downloads
Integrate With TileLayer
Generate a specialised TileProvider
that allows flutter_map to access cached tiles