Skip to content

WMTSLayer

WMTS Layer, see the WMTS Standard

Example

Example Source Code
vue
<template>
  <div style="height: 400px" class="vw-full vh-full">
    <mb-map>
      <mb-wmts-layer
        url="http://t{s}.tianditu.gov.cn/img_w/wmts?tk=b8ed92ff9b64aebcb0110acca15e478f"
        layer-name="img"
        layer-style="default"
        tile-matrimb-set-i-d="w"
        subdomains="01234567"
        :maxzoom="18"
      />
    </mb-map>
  </div>
</template>

<script setup lang="ts"></script>

API

PROPS

NameDescriptionTypeDefault
idLayer ID. A unique identifier for the layer.string-
layer-nameLayer name. The name of the layer as defined in the WMTS capabilities document.string-
layer-styleLayer style. The style of the layer to be used, as defined in the WMTS capabilities document.string-
tile-matrix-set-i-dTile Matrix Set ID. Identifies the Tile Matrix Set to be used for this layer, as defined in the WMTS capabilities document. This defines the tiling scheme (resolutions, scales, tile sizes, etc.).string-
tile-sizeTile size in pixels. This defines the width and height of each tile. Typically 256 for standard WMTS.number256
urlWMTS server URL. The base URL of the WMTS service endpoint. This URL is used to construct tile requests.string-
formatImage format of the tiles. Common values include image/png, image/jpeg, and image/webp.string'image/png'
maxzoomMaximum zoom level. The highest zoom level at which tiles are available. This corresponds to the highest resolution.number22
minzoomMinimum zoom level. The lowest zoom level at which tiles are available. This corresponds to the lowest resolution.number0
showVisibility of the layer. If true, the layer is displayed; if false, the layer is hidden.booleantrue
subdomainsSubdomains for the URL. This is used for load balancing by distributing tile requests across multiple subdomains. If provided, the URL will be templated with {s} where the subdomain should be inserted (e.g., http://{s}.example.com/wmts). Can be a string or an array of strings.string / string[] / number[]-
tile-matrix-prefixTile Matrix prefix. A prefix that may be added to the TileMatrix identifier in the tile URLs. This is sometimes required by certain WMTS implementations.string-
extra-paramsExtra parameters to be added to the tile URLs. These are additional query parameters that can be used to customize tile requests. The value should be a URL query string (e.g., "version=1.0.0&request=GetTile").string-

EVENTS

NameDescriptionParameters
createdInitialization complete event-

SLOTS

NameDescription

METHODS

NameDescriptionDefinition