1、arcgis发布wms服务,在配置中勾选wms即可

注意,不同于wms需要单独勾选,wmts服务默认与切片图层存在
例如,其官网卫星图服务为切片服务,默认可用wmts形式
https://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/WMTS/1.0.0/WMTSCapabilities.xml
2、高德地图api中wms图层及相关参数
https://lbs.amap.com/api/javascript-api/reference/wms#wms

3、加载arcgis发布的wms图层完整参数:
var wms = new AMap.TileLayer.WMS({
url:'http://ip:6080/xxx/MapServer/WMSServer',
blend:false,
tileSize:512,
//params:{'LAYERS': '0',VERSION:'1.3.0', FORMAT:'image/png',STYLES:'default'}
//多图层注意要对应相同数量的styles
params:{layers: '0,1,2',VERSION:'1.3.0',FORMAT:'image/png',STYLES:'default,default,default'}
})
4、 高德地图api加载geoserver发布的wms服务对照;
(例子中同时展示了如何添加多个图层)
var wms = new AMap.TileLayer.WMS({
url:'http://ip:8080/geoserver/citydo/wms',
blend:false,
tileSize:512,
params:{
layers: 'citydo%3A浙江xx_禁养区_3857,citydo%3A浙江xx_限养区_3857',
VERSION:'1.3.0',
FORMAT:'image/png'
}
})
网友评论