1. WMTS 描述
WMTS(Web Map Tiles Service):地图切片Web服务。
2. 数据示例:
arcgis online 导出的wmts xml:
https://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS
内容解析:
- contents中可能包含多个layer, 每个layer对应一个请求地址,首先找到source_url
- Find the
Style value which is "default". In the URL, replace {Style} with default or the corresponding value in your XML file.
- Find the
TileMatrixSet value which is "default028mm". In the URL, replace {TileMatrixSet} with default028mm or the corresponding value in your XML file.
- Update the template and set {TileMatrix}/{TileRow}/{TileCol} to {z}/{y}/{x} and add the image file extension (.png) to the end of the URL.
javascript
https://maps.vcgi.vermont.gov/arcgis/rest/services/EGC_services/IMG_VCGI_LIDARHILLSHD_WM_CACHE_v1/ImageServer/WMTS/tile/1.0.0/EGC_services_IMG_VCGI_LIDARHILLSHD_WM_CACHE_v1/default/default028mm/{z}/{x}/{y}.png
-
获取tileSize
-
之后则可以在mapbox中加载此raster 图层进行展示