ArcGISVectorTiledLayer Class
Displays data from an ArcGIS vector tiled data source. More...
Header: | #include <ArcGISVectorTiledLayer.h> |
Since: | Esri::ArcGISRuntime 100.0 |
Inherits: | Esri::ArcGISRuntime::Layer, Esri::ArcGISRuntime::ApiKeyResource, and Esri::ArcGISRuntime::RemoteResource |
Public Functions
ArcGISVectorTiledLayer(Esri::ArcGISRuntime::VectorTileCache *vectorTileCache, Esri::ArcGISRuntime::ItemResourceCache *itemResourceCache, QObject *parent = nullptr) | |
ArcGISVectorTiledLayer(Esri::ArcGISRuntime::VectorTileCache *vectorTileCache, QObject *parent = nullptr) | |
ArcGISVectorTiledLayer(Esri::ArcGISRuntime::Item *item, QObject *parent = nullptr) | |
ArcGISVectorTiledLayer(const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr) | |
ArcGISVectorTiledLayer(const QUrl &url, QObject *parent = nullptr) | |
virtual | ~ArcGISVectorTiledLayer() override |
Esri::ArcGISRuntime::ItemResourceCache * | itemResourceCache() const |
Esri::ArcGISRuntime::VectorTileSourceInfo | sourceInfo() const |
Esri::ArcGISRuntime::VectorTileStyle | style() const |
Esri::ArcGISRuntime::VectorTileCache * | vectorTileCache() const |
Reimplemented Public Functions
virtual QString | apiKey() const override |
virtual Esri::ArcGISRuntime::Credential * | credential() const override |
virtual Esri::ArcGISRuntime::RequestConfiguration | requestConfiguration() const override |
virtual void | setApiKey(const QString &apiKey) override |
virtual void | setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration) override |
virtual QUrl | url() const override |
Detailed Description
The ArcGIS Vector Tiled Layer is similar to the ArcGIS Tiled Layer. An ArcGIS Vector Tiled Layer is loaded from ArcGIS online, ArcGIS Enterprise, ArcGIS Server, or a local vector tile layer package file. The tile data format is optimized to reduce network bandwidth and reduce CPU load while rendering the tiles. Vector Tiled Layers are appropriate for basemap, reference and possibly operational layers. They do not contain any feature data, and do not support identify or search operations.
Vector tiles are an alternative to raster tile basemap layers. Instead of pixels (raster), the cartography is delivered using 2D points. The points describe lines, polygons, or the locations of labels and marker symbols. The file format of tiles is binary and conforms to the Mapbox Vector Tile Specification. This specification allows a more continuous visual experience between levels of detail compared to raster tiles. The vector tile file format also requires less space than raster tiles.
You can create a vector tiled layer using either a URL or a portal item. The URL can point to a vector tile source, a vector tile style sheet, or a local vector tile package file. The portal item will contain a URL to a vector tile stylesheet. The style sheet describes the appearance of the geometry and must be in the Mapbox GL Style format. The style sheet also contains a URL to a vector tile source. The source must be in the Mapbox TileJSON format. The source info includes a URL to a default style sheet.
More than one vector tile style sheet can use the same source. Both the source info and the style sheet are human readable JSON files.
Vector tile packages can also be downloaded from a ArcGIS Online vector tile service. The vector tile package is a single file (.vptk) that 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.
Vector tile packages are also distributed inside Mobile Map Packages. The MMPK contains JSON that points to the location of the vector tile style sheet or the root of the vector tile package data.
Example:
Display the Navigation vector tile layer by using an online service:
Alternatively, you can display vector tiles offline by setting the file path to a local vector tile package (*.vtpk):
See sample: Vector tiled layer (URL)
See also Layer, LayerContent, Loadable, and RemoteResource.
Member Function Documentation
[since Esri::ArcGISRuntime 100.2]
ArcGISVectorTiledLayer::ArcGISVectorTiledLayer (Esri::ArcGISRuntime::VectorTileCache *vectorTileCache , Esri::ArcGISRuntime::ItemResourceCache *itemResourceCache , QObject *parent = nullptr)
Constructor that accepts a VectorTileCache (vectorTileCache), an ItemResourceCache (itemResourceCache), and an optional parent.
This function was introduced in Esri::ArcGISRuntime 100.2.
[since Esri::ArcGISRuntime 100.2]
ArcGISVectorTiledLayer::ArcGISVectorTiledLayer (Esri::ArcGISRuntime::VectorTileCache *vectorTileCache , QObject *parent = nullptr)
Constructor that accepts a VectorTileCache (vectorTileCache) and an optional parent.
This function was introduced in Esri::ArcGISRuntime 100.2.
ArcGISVectorTiledLayer::ArcGISVectorTiledLayer (Esri::ArcGISRuntime::Item *item, QObject *parent = nullptr)
Constructor that accepts an item (item) and an optional parent.
ArcGISVectorTiledLayer::ArcGISVectorTiledLayer (const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
Constructor that accepts the URL (url), a credential, and an optional parent.
The credential is applied if the provided URL is to a secured service.
ArcGISVectorTiledLayer::ArcGISVectorTiledLayer (const QUrl &url, QObject *parent = nullptr)
Constructor that accepts a URL (url) and an optional parent.
The URL can be to either an online service or a local vector tile cache.
[override virtual]
ArcGISVectorTiledLayer::~ArcGISVectorTiledLayer ()
Destructor.
[override virtual, since Esri::ArcGISRuntime 100.10]
QString ArcGISVectorTiledLayer::apiKey () const
Reimplements: ApiKeyResource::apiKey() const.
Returns the API key. See ApiKeyResource.
This function was introduced in Esri::ArcGISRuntime 100.10.
See also setApiKey().
[override virtual]
Esri::ArcGISRuntime::Credential *ArcGISVectorTiledLayer::credential() const
Reimplements: RemoteResource::credential() const.
Returns the security credential used to access the tiled service.
This property is available if the service is secured.
[since Esri::ArcGISRuntime 100.2]
Esri::ArcGISRuntime::ItemResourceCache *ArcGISVectorTiledLayer::itemResourceCache () const
Returns the item resource cache if present.
This function was introduced in Esri::ArcGISRuntime 100.2.
[override virtual, since Esri::ArcGISRuntime 100.1]
Esri::ArcGISRuntime::RequestConfiguration ArcGISVectorTiledLayer::requestConfiguration () const
Reimplements: RemoteResource::requestConfiguration() const.
Returns the RequestConfiguration in use by this layer.
This function was introduced in Esri::ArcGISRuntime 100.1.
See also setRequestConfiguration().
[override virtual, since Esri::ArcGISRuntime 100.10]
void ArcGISVectorTiledLayer::setApiKey (const QString &apiKey )
Reimplements: ApiKeyResource::setApiKey(const QString &apiKey).
Sets the API key to apiKey. See ApiKeyResource.
This function was introduced in Esri::ArcGISRuntime 100.10.
See also apiKey().
[override virtual, since Esri::ArcGISRuntime 100.1]
void ArcGISVectorTiledLayer::setRequestConfiguration (const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration )
Reimplements: RemoteResource::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration).
Sets requestConfiguration used for network requests sent by this layer.
This function was introduced in Esri::ArcGISRuntime 100.1.
See also requestConfiguration().
Esri::ArcGISRuntime::VectorTileSourceInfo ArcGISVectorTiledLayer::sourceInfo () const
Returns information about the vector tile layer's source.
The returned VectorTileSource includes name, extent, visible scale, and so on.
Esri::ArcGISRuntime::VectorTileStyle ArcGISVectorTiledLayer::style() const
Returns information about the style sheet used with this vector tiled layer.
The returned VectorTileStyle includes the style sheet's URL, version, and so on.
[override virtual]
QUrl ArcGISVectorTiledLayer::url() const
Reimplements: RemoteResource::url() const.
Returns the URL of the layer's source.
The URL can refer to an online service or a path to a local vector tile cache.
[since Esri::ArcGISRuntime 100.2]
Esri::ArcGISRuntime::VectorTileCache *ArcGISVectorTiledLayer::vectorTileCache () const
If the layer was created from a vector tile cache or local file, then this property will return the vector tile cache.
This function was introduced in Esri::ArcGISRuntime 100.2.