iclient for mapboxgl 支持其他平台发布的wms,wmts服务吗?
limzgiser opened this issue · 2 comments
Request a feature or report a bug? [这是一个需求还是一个缺陷]
One-line summary [问题简述]
Version [产品及版本]
- iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]:
- iClient version [iClient 版本]:
- Browser version [浏览器类型和版本]:
- OS Version [操作系统类型和版本]:
Actual Behavior [当前现象]
Expected Behavior [期望现象]
Example of reproducing the issue [重现现象的例子]
What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]
谢谢您提的issue。为方便我们定位和解决问题,请尽量参照issue模板提问题。
mapbox gl 自身支持web mercator(3857)的raster图层,raster图层所用到的source支持配置tiles参数,tiles参数中支持{z} {y} {x} {bbox-epsg-3857}这些replacement token。https://docs.mapbox.com/mapbox-gl-js/style-spec/sources/
WMTS 和 WMS 是 OGC 的规范,各个平台发布的服务都应该遵循 OGC 的规范,比如 SuperMap iServer。
所以
可以使用{z} {y} {x} 来对应规范 OGC WMTS 服务 GetTile 操作的 {TileMatrix}、{TileRow}、{TileCol} 参数
"sources": { "raster-tiles": { "type": "raster", "tiles": ['https://iserver.supermap.io/iserver/services/map-china400/wmts100/China/default/GoogleMapsCompatible_China/{z}/{y}/{x}.png'], "tileSize": 256 } }
可以使用 {bbox-epsg-3857}来对应规范 OGC WMS 服务的 GetMap 操作的 bbox 参数
"sources": { "raster-tiles": { "type": "raster", "tiles": ['https://iserver.supermap.io/iserver/services/map-china400/wms111/China?service=WMS&request=GetMap&layers=China&styles=&format=image%2Fpng&transparent=true&version=1.1.1&width=256&height=256&srs=EPSG%3A3857&bbox={bbox-epsg-3857}'], "tileSize": 256 } }
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.