A local cache of vector tiles that can be used to create an ArcGISVectorTiledLayer. More...
Header: | #include <VectorTileCache.h> |
Since: | Esri::ArcGISRuntime 100.2 |
Inherits: | Esri::ArcGISRuntime::Object and Esri::ArcGISRuntime::Loadable |
Public Functions
VectorTileCache(const QString &path, QObject *parent = nullptr) | |
virtual | ~VectorTileCache() override |
QString | path() const |
Esri::ArcGISRuntime::VectorTileSourceInfo | sourceInfo() const |
QImage | thumbnail() const |
Reimplemented Public Functions
virtual void | cancelLoad() override |
virtual void | load() override |
virtual Esri::ArcGISRuntime::Error | loadError() const override |
virtual Esri::ArcGISRuntime::LoadStatus | loadStatus() const override |
virtual void | retryLoad() override |
Signals
void | doneLoading(const Esri::ArcGISRuntime::Error &loadError) |
void | loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus) |
Detailed Description
Local tile caches are ideal for providing basemaps or less frequently changing contextual layers, where network access is limited or non-existent. You can create and download a vector tile cache onto a device by using an ExportVectorTilesJob, or alternatively you can provision it directly to local storage. Currently the only supported type of cache is the vector tile package (.vtpk). This single file contains all of the tile data files, the source information, a style sheet, and the font and symbol marker resources required to display the map.
You can create an ArcGISVectorTiledLayer from a VectorTileCache and then use it as a basemap or as an operational layer in a map or scene.
Relevant samples:
- Export vector tiles: Export tiles from an online vector tile service.
Member Function Documentation
[explicit]
VectorTileCache::VectorTileCache (const QString &path, QObject *parent = nullptr)
Create a vector tile cache with the given path.
- path - path.
- parent - The optional parent QObject.
[override virtual]
VectorTileCache::~VectorTileCache ()
Destructor
[override virtual]
void VectorTileCache::cancelLoad ()
Reimplements: Loadable::cancelLoad().
Cancels loading metadata for the object.
Cancels loading the metadata if the object is loading.
See Loadable.
[signal]
void VectorTileCache::doneLoading (const Esri::ArcGISRuntime::Error &loadError )
Signal emitted when this object is done loading.
- loadError - Details about any error that may have occurred.
If there is a load error, it will also be emitted on the errorOccurred
signal.
[override virtual]
void VectorTileCache::load()
Reimplements: Loadable::load().
Loads the metadata for the object asynchronously.
Loads the metadata if the object is not loaded.
See Loadable.
[override virtual]
Esri::ArcGISRuntime::Error VectorTileCache::loadError () const
Reimplements: Loadable::loadError() const.
Returns the load error.
See Loadable.
See also Error.
[override virtual]
Esri::ArcGISRuntime::LoadStatus VectorTileCache::loadStatus () const
Reimplements: Loadable::loadStatus() const.
Returns the load status.
See Loadable.
See also LoadStatus.
[signal]
void VectorTileCache::loadStatusChanged (Esri::ArcGISRuntime::LoadStatus loadStatus )
loadStatus See Loadable.
QString VectorTileCache::path() const
Returns the path to the on disk source file for this vector tile cache.
This path can be empty when the vector tile cache is contained within a MobileMapPackage or MobileScenePackage.
[override virtual]
void VectorTileCache::retryLoad ()
Reimplements: Loadable::retryLoad().
Loads or retries loading metadata for the object asynchronously.
Will retry loading the metadata if the object is failed to load. Will load the object if it is not loaded. Will not retry to load the object if the object is loaded. Will always call the done loading if this is called.
See Loadable.
Esri::ArcGISRuntime::VectorTileSourceInfo VectorTileCache::sourceInfo () const
Returns the information about the vector tile cache's source.
The returned VectorTileSourceInfo includes name, extent, visible scale, and so on.
QImage VectorTileCache::thumbnail() const
Returns the thumbnail for this vector tile cache.