Skip To Content ArcGIS for Developers Sign In Dashboard

ItemResourceCache Class


Contains information on offline resources, typically associated with a custom style for an ArcGISVectorTiledLayer. More...

Header: #include <ItemResourceCache>
Since: Esri::ArcGISRuntime 100.2
Inherits: Object and Loadable

Public Functions

ItemResourceCache(const QString &path, QObject *parent = nullptr)
LocalItem *item() const
QString path() const

Reimplemented Public Functions

virtual void cancelLoad()
virtual void load()
virtual Error loadError() const
virtual LoadStatus loadStatus() const
virtual void retryLoad()


void doneLoading(Esri::ArcGISRuntime::Error loadError)
void loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 10 static public members inherited from QObject
  • 9 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

Contains information on offline resources, typically associated with a custom style for an ArcGISVectorTiledLayer.

For example, a vector tile layer has style resources such as fonts and sprites.

Member Function Documentation

ItemResourceCache::ItemResourceCache(const QString &path, QObject *parent = nullptr)

Constructor that takes a path to the item resource cache, and an optional parent object.



[virtual] void ItemResourceCache::cancelLoad()

Reimplemented from Loadable::cancelLoad().

See Loadable.

[signal] void ItemResourceCache::doneLoading(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.

See also Loadable and Object.

LocalItem *ItemResourceCache::item() const

Returns the local item containing this item resource cache's thumbnail and metadata.

This property can be a nullptr if the LocalItem is not present within the ItemResourceCache directory. If the ItemResourceCache was taken offline using ExportVectorTilesTask or OfflineMapTask, the LocalItem will be populated from the online PortalItem. If the ItemResourceCache was created inside a MobileMapPackage authored from ArcGIS Pro, then this property will return a nullptr.

[virtual] void ItemResourceCache::load()

Reimplemented from Loadable::load().

See Loadable.

[virtual] Error ItemResourceCache::loadError() const

Reimplemented from Loadable::loadError().

See Loadable.

[virtual] LoadStatus ItemResourceCache::loadStatus() const

Reimplemented from Loadable::loadStatus().

See Loadable.

[signal] void ItemResourceCache::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

loadStatus See Loadable.

QString ItemResourceCache::path() const

Returns the path to the on-disk location containing this item resource cache.

The path can be a directory on disk that contains the ItemResourceCache. Alternatively, if the ItemResourceCache was loaded from a package file, such as a MobileMapPackage, the path is to the package.

[virtual] void ItemResourceCache::retryLoad()

Reimplemented from Loadable::retryLoad().

See Loadable.

Feedback on this topic?