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.6
Since: Esri.ArcGISRuntime 100.1
Inherits:

ImageTiledLayer

Properties

Signals

Detailed Description

An instance of this class allows you to 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.

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 load method. Use the layer loadStatus property to determine when the layer is ready, and check the loadStatus before using the layer.

A WmtsLayer can be instantiated with a url and a wmtsLayerId, or a layerInfo. Some properties are mutually exclusive. See the table below on which properties can be used in conjunction with each other. Note that requestConfiguration and credential are always optional so are not included in the table.

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 also LayerContent, Loadable, RemoteResource, WmtsServiceInfo, 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.


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.


layerInfoChanged()

Emitted when the layerInfo property changes.


preferredImageFormatChanged()

Emitted when the preferredImageFormat property changes.


requestConfigurationChanged()

Emitted when the requestConfiguration property changes.


tileMatrixSetChanged()

Emitted when the tileMatrixSet property changes.


tileMatrixSetIdChanged()

Emitted when the tileMatrixSetId property changes.


urlChanged()

Emitted when the url property changes.


wmtsLayerIdChanged()

Emitted when the wmtsLayerId property changes.



Feedback on this topic?