Skip To Content ArcGIS for Developers Sign In Dashboard

WmtsLayer QML Type

Defines an Open Geospatial Consortium (OGC) Web Map Tile Service (WMTS) layer. More...

Import Statement: import Esri.ArcGISRuntime 100.9
Since: Esri.ArcGISRuntime 100.1
Inherits:

ImageTiledLayer

Properties

Signals

Detailed Description

An instance of this class lets you display data from a WMTS service by using pre-generated tiles. A WmtsLayer uses pre-generated tiles to create a map instead of dynamically generating map images.

Web Map Tile Service (WMTS) is an Open GeospatialConsortium (OGC) standard for delivering geographic data via raster tiles. ArcGIS Runtime supports WMTS 1.0.0. The service may be hosted in the cloud on ArcGIS Online, on a third party server, or on-premises with ArcGIS Server.

Functional characteristics

The 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.

Performance characteristics

WMTS layer consumes raster tiles that were pre-rendered 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.

WmtsLayer adopts the loadable pattern; many of its properties are initialized asynchronously. See Loadable for more information. The layer is loaded when displayed in a MapView or a SceneView. If using the layer without a MapView or a SceneView, call the Loadable::load method. Use the Loadable::loadStatusChanged signal to determine when the layer is ready, and check the Enums.LoadStatus before using the layer.

Example: Add a WMTS layer to a map:

WmtsLayer {
    id: wmtsLayer
    layerId: "WorldTimeZones"
    url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS"

    onLoadStatusChanged: {
        if (loadError)
            console.log(loadError.message, loadError.additionalMessage);

        if (loadStatus !== Enums.LoadStatusLoaded)
            return;

        // work with WMTS layer
    }
}
var map = ArcGISRuntimeEnvironment.createObject("Map");
map.operationalLayers.append(wmtsLayer);
Required propertiesurlwmtsLayerIdtileMatrixSetIdimageFormatlayerInfotileMatrixSet
url and wmtsLayerIdrequiredrequiredoptionaloptionalunusedunused
layerInfounusedunusedunusedoptionalrequiredoptional

Default properties

This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.

See sample: WMTS layer

See also LayerContent, Loadable, RemoteResource, WmtsServiceInfo, Layer, ImageTiledLayer, and Loadable.

Property Documentation

[default] credential : Credential

The credential used to access a secured tiled service.

The credential cannot be changed after the layer is loaded.


customParameters : jsobject

Returns key/value pairs representing the custom parameters.

These parameters are appended to GetTile requests. If a parameter with the same name is defined in the service's custom parameters, then layer-specific values take precedence over service-wide values.

When used together with a WmtsService, if a parameter with the same name is defined in the service's custom parameters, then layer-specific values will take precedence over service-wide parameter values.

This property was introduced in Esri.ArcGISRuntime 100.6.


layerInfo : WmtsLayerInfo

The WmtsLayerInfo describing the layer.

For example, obtained from WmtsServiceInfo::layerInfos.


preferredImageFormat : Enums.TileImageFormat

The tile image format for this layer.

For example, obtained from WmtsLayerInfo::imageFormats

See also Enums.TileImageFormat.


requestConfiguration : RequestConfiguration

Returns the RequestConfiguration in use by this layer.


tileMatrixSet : WmtsTileMatrixSet

The WmtsTileMatrixSet for this layer.

For example, obtained from WmtsServiceInfo::tileMatrixSets.


tileMatrixSetId : string

The ID of the tile matrix set used for this layer.

For example, obtained from WmtsTileMatrixSet::tileMatrixSetId.


url : url

The URL of the WMTS service.

/sa /l WmtsService::url.


wmtsLayerId : string

The ID of the layer.

For example, obtained from WmtsLayerInfo::wmtsLayerId.


Signal Documentation

credentialChanged()

Emitted when the credential property changes.

Note: The corresponding handler is onCredentialChanged.


customParametersChanged()

Emitted when the customParameters property changes.

Note: The corresponding handler is onCustomParametersChanged.

This signal was introduced in Esri.ArcGISRuntime 100.6.


layerInfoChanged()

Emitted when the layerInfo property changes.

Note: The corresponding handler is onLayerInfoChanged.


preferredImageFormatChanged()

Emitted when the preferredImageFormat property changes.

Note: The corresponding handler is onPreferredImageFormatChanged.


requestConfigurationChanged()

Emitted when the requestConfiguration property changes.

Note: The corresponding handler is onRequestConfigurationChanged.


tileMatrixSetChanged()

Emitted when the tileMatrixSet property changes.

Note: The corresponding handler is onTileMatrixSetChanged.


tileMatrixSetIdChanged()

Emitted when the tileMatrixSetId property changes.

Note: The corresponding handler is onTileMatrixSetIdChanged.


urlChanged()

Emitted when the url property changes.

Note: The corresponding handler is onUrlChanged.


wmtsLayerIdChanged()

Emitted when the wmtsLayerId property changes.

Note: The corresponding handler is onWmtsLayerIdChanged.



Feedback on this topic?