The WMTSLayer object defines the properties required by the layer built using the WMTS service.
Attribute | Type | Description |
layerType |
string |
[Required] The layer type. Fixed constant: "WMTS". |
name |
string |
[Required] The layer name. |
visible |
boolean |
[Required] The visibility of the layer. |
url |
string |
[Required] The address (uri) of the map service. |
layer |
string |
[Required] The name of the layer in the WMTS service. |
tileMatrixSet |
string |
[Required] The tile matrix set corresponding to the layer in the WMTS service. |
dpi |
number |
[Required] The screen resolution of the WMTS service source, that is, the number of pixels contained in each inch of length. |
opacity |
number |
[Optional] The opacity of the layer. The maximum value is 1 and the minimum value is 0. |
visibleScale |
[Optional] Stores the visible scale range of the current layer. |
|
requestEncoding |
string |
[Optional] WMTS service access mode, two access modes are available: HTTP KVP (key-value pair) or REST. |
Use the WMTS map service to build a layer that conforms to the WebMap specification.
{
"layers": [
{
"layerType": "WMTS",
"name": "World",
"visible": true,
"url": "http://192.168.17.199:8090/iserver/services/map-world/wmts100",
"tileMatrixSet": "GoogleMapsCompatible_World",
"layer": "World",
"requestEncoding": "KVP",
"visibleScale": {
"maxScale": "1:2256.999",
"minScale": "1:591658710.909"
},
"opacity": 0.85,
"dpi": 96
}
]
}