The style information for a vector tile layer. More...
Header: | #include <VectorTileStyle.h> |
Since: | Esri::ArcGISRuntime 100.0 |
Public Functions
VectorTileStyle() | |
VectorTileStyle(const Esri::ArcGISRuntime::VectorTileStyle &other) | |
VectorTileStyle(Esri::ArcGISRuntime::VectorTileStyle &&other) | |
~VectorTileStyle() | |
bool | isEmpty() const |
QUrl | url() const |
QString | version() const |
Esri::ArcGISRuntime::VectorTileStyle & | operator=(const Esri::ArcGISRuntime::VectorTileStyle &other) |
Esri::ArcGISRuntime::VectorTileStyle & | operator=(Esri::ArcGISRuntime::VectorTileStyle &&other) |
Detailed Description
Styles allows vector tiles to be visualized in different ways, such as day and night viewing. A vector tile style is a JSON structure and resources that define how the contents of vector tiles are displayed using an ArcGISVectorTiledLayer. Each style contains sets of visual properties for a vector tiled layer, such as fill colors, viewing levels, and labels, and its resources include fonts and sprites. Each ArcGIS vector tile source will have a default vector tile style and may have additional custom styles.
You can download vector tiles, their default style and any custom style resources by using the ExportVectorTilesTask. To download styles, check that ExportVectorTilesTask::hasStyleResources is true
. If you want to download a vector tile cache with a custom vector tile style, use ExportVectorTilesTask::exportVectorTiles(const Esri::ArcGISRuntime::ExportVectorTilesParameters&, const QString&, const QString&) to generate the ExportVectorTilesJob and specify the local paths to store vector tile cache and the item resource cache. If you just want to download a custom style, use the ExportVectorTilesTask::exportStyleResourceCache(const QString&) to generate the ExportVectorTilesJob and specify the local path to store the item resource cache.
To display tiles from a local vector tile package (.vtpk) using a custom vector tile style, use the ArcGISVectorTiledLayer::ArcGISVectorTiledLayer(Esri::ArcGISRuntime::VectorTileCache*, Esri::ArcGISRuntime::ItemResourceCache*, QObject*) constructor and provide the custom item resource cache for the style.
You can create new styles for an ArcGIS vector tile source using the ArcGIS Vector Tile Style Editor. ArcGIS Online provides some example layers with multiple styles in Creative Vector Tile Layers and Web Maps.
See also VectorTileSourceInfo::defaultStyle and ArcGISVectorTiledLayer::style.
Member Function Documentation
VectorTileStyle::VectorTileStyle ()
Default constructor.
VectorTileStyle::VectorTileStyle (const Esri::ArcGISRuntime::VectorTileStyle &other)
Copy constructor from other VectorTileStyle.
VectorTileStyle::VectorTileStyle (Esri::ArcGISRuntime::VectorTileStyle &&other)
Move constructor from other VectorTileStyle.
VectorTileStyle::~VectorTileStyle ()
Destructor.
bool VectorTileStyle::isEmpty () const
Returns whether this object is empty.
QUrl VectorTileStyle::url() const
Returns the style sheet's URL.
QString VectorTileStyle::version() const
Returns the style version.
Esri::ArcGISRuntime::VectorTileStyle &VectorTileStyle::operator=(const Esri::ArcGISRuntime::VectorTileStyle &other)
Assignment operator from other VectorTileStyle.
Esri::ArcGISRuntime::VectorTileStyle &VectorTileStyle::operator=(Esri::ArcGISRuntime::VectorTileStyle &&other)
Move operator from other VectorTileStyle.