A layer that can visualize data from a WMTS service by using pre-generated tiles. More...
Detailed DescriptionWeb Map Tile Service (WMTS) is an Open Geospatial Consortium (OGC) standard for delivering geographic data via raster tiles. A WMTS layer uses pre-generated tiles to create a map instead of dynamically generating map images.The service may be hosted in ArcGIS Online, in ArcGIS Enterprise, or in a third party Server. This API supports WMTS 1.0.0.
A WMTS layer uses pre-generated tiles to create a map instead of dynamically generating map images.
Functional characteristicsThe maps provided by a WMTS service use predefined symbology defined by the server. As a result, it is not possible to apply custom renderers or to visualize feature selection.
A WMTS service can contain multiple layers in a hierarchy. A WMTS layer can be constructed directly with a URL to a service and the uniquely identifying name of the desired layer. Alternatively, a WMTS service can be used to programmatically explore the available layers and allow the user to choose layers at run time.
When creating a WmtsLayer, some WMTS services require that you provide a direct URL to the getCapabilities resource by appending either /1.0.0/WMTSCapabilities.xml or ?service=wmts&request=getCapabilities&version=1.0.0 to the root WMTS URL.
Performance characteristicsWMTS layer consumes raster tiles that were previously rendered and cached by a server. WMTS requires fewer server resources than WMS because the images are rendered and cached ahead of time. WMTS layer requires a connection to the service at all times.
Example: Add a WMTS layer to a map:
QUrl wmtsUrl("http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS"); QString layerId = "WorldTimeZones"; auto* wmtsLayer = new WmtsLayer(wmtsUrl, layerId, parent); connect(wmtsLayer, &WmtsLayer::doneLoading, parent, [wmtsLayer](const Esri::ArcGISRuntime::Error& loadError) { if (!loadError.isEmpty()) { qDebug() << loadError.message() << ": " << loadError.additionalMessage(); } if (wmtsLayer->loadStatus() != LoadStatus::Loaded) { return; } // work with WMTS layer here }); Map* map = new Map(BasemapStyle::ArcGISImagery, parent); map->operationalLayers()->append(wmtsLayer);
Relevant samples:
[explicit, since Esri::ArcGISRuntime 200.7]
WmtsLayer::WmtsLayer(Esri::ArcGISRuntime::PortalItem *portalItem, QObject *parent = nullptr)
Creates a WmtsLayer object from the given portal item.
The portal item's type must be PortalItemType::WMTS.
This function was introduced in Esri::ArcGISRuntime 200.7.
See also PortalItem, PortalItem::PortalItem(const QUrl&, QObject*), and Layer::item.
[explicit]
WmtsLayer::WmtsLayer(const Esri::ArcGISRuntime::WmtsLayerInfo &layerInfo, QObject *parent = nullptr)
Creates a WMTS layer from a WMTS layer information.
See also WmtsLayer.
WmtsLayer::WmtsLayer(const Esri::ArcGISRuntime::WmtsLayerInfo &layerInfo, Esri::ArcGISRuntime::TileImageFormat preferredImageFormat, QObject *parent = nullptr)Creates a WMTS layer from a WMTS layer information and preferred image format.
See also WmtsLayer.
WmtsLayer::WmtsLayer(const Esri::ArcGISRuntime::WmtsLayerInfo &layerInfo, const Esri::ArcGISRuntime::WmtsTileMatrixSet &tileMatrixSet, QObject *parent = nullptr)Creates a WMTS layer from a WMTS layer information and tile matrix set Id.
See also WmtsLayer.
WmtsLayer::WmtsLayer(const QUrl &url, const QString &wmtsLayerId, QObject *parent = nullptr)Creates a WMTS layer from the specified URL and layer Id.
See also WmtsLayer.
WmtsLayer::WmtsLayer(const Esri::ArcGISRuntime::WmtsLayerInfo &layerInfo, const Esri::ArcGISRuntime::WmtsTileMatrixSet &tileMatrixSet, Esri::ArcGISRuntime::TileImageFormat preferredImageFormat, QObject *parent = nullptr)Creates a WMTS layer from the WMTS layer information, tile matrix set Id and preferred image format.
See also WmtsLayer.
WmtsLayer::WmtsLayer(const QUrl &url, const QString &wmtsLayerId, Esri::ArcGISRuntime::TileImageFormat preferredImageFormat, QObject *parent = nullptr)Creates a WMTS layer from the specified URL, layer Id, and preferred image format.
See also WmtsLayer.
WmtsLayer::WmtsLayer(const QUrl &url, const QString &wmtsLayerId, const QString &tileMatrixSetId, QObject *parent = nullptr)Creates a WMTS layer from the specified URL, layer Id, and tile matrix set Id.
See also WmtsLayer.
WmtsLayer::WmtsLayer(const QUrl &url, const QString &wmtsLayerId, const QString &tileMatrixSetId, Esri::ArcGISRuntime::TileImageFormat preferredImageFormat, QObject *parent = nullptr)Creates a WMTS layer from the specified URL, layer Id, tile matrix set Id and preferred image format.
See also WmtsLayer.
[override virtual noexcept]
WmtsLayer::~WmtsLayer()
Destructor.
[since Esri::ArcGISRuntime 100.6]
QMap<QString, QString> WmtsLayer::customParameters() const
Returns the dictionary of custom parameters to be sent with WMTS requests issued by this layer.
These parameters are appended to GetMap and GetFeatureInfo requests. If a parameter with the same name is defined in WmtsService::customParameters, then layer-specific values take precedence over service-wide values.
This function was introduced in Esri::ArcGISRuntime 100.6.
See also setCustomParameters().
Esri::ArcGISRuntime::WmtsLayerInfo WmtsLayer::layerInfo() constReturns the WMTS Layer information.
Esri::ArcGISRuntime::TileImageFormat WmtsLayer::preferredImageFormat() constReturns the preferred image format used for tiles of this WMTS layer.
If an image format is not specified when creating this layer, then the value is TileImageFormat::Unknown until the layer is loaded.
[since Esri::ArcGISRuntime 100.6]
void WmtsLayer::setCustomParameters(const QMap<QString, QString> &customParameters)
Sets the customParameters to customParameters.
This function was introduced in Esri::ArcGISRuntime 100.6.
See also customParameters.
Esri::ArcGISRuntime::WmtsTileMatrixSet WmtsLayer::tileMatrixSet() constReturns the WMTS tile matrix set for this WMTS layer.
If tile matrix set is not specified when creating this layer, or is specified only by name, then the value is empty until the layer is loaded.
QString WmtsLayer::tileMatrixSetId() constReturns the tile matrix set identifier for this WMTS layer.
If tile matrix set is not specified when creating this layer, or is specified only by name, then the value is empty until layer is loaded.
[override virtual]
QUrl WmtsLayer::url() const
Reimplements: RemoteResource::url() const.
Returns the URL of the WMTS service.
This property is assigned a value when the layer is created. However, if the layer is created from a PortalItem, the property will be empty until the layer is loaded.
This value cannot be changed on loaded layers, or on layers created from a WmtsLayerInfo.
{WmtsLayer(const QUrl&, const QString&, QObject*)}
See also Esri::ArcGISRuntime::WmtsLayer::WmtsLayer(const QUrl&, const QString&, QObject*).
QString WmtsLayer::wmtsLayerId() constReturns the id of the WMTS layer.
layerId cannot be changed on loaded layers, or on layers created from a WmtsLayerInfo.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4