arcgis js之调用wms服务

arcgis js之调用wms服务

定义:

export const tdtlayer = async () => {
  let WMSLayer = await arcgisPackage.WMSLayer
  let WL = new WMSLayer({
    url: 'http://xxx.xxx.xxx.xxx:8080/iserver/services/map-tianditu/wms',
    sublayers: [{
      name: '7' // name of the sublayer
    }],
    title: '影像底图-墨卡托',
    spatialReference: [4490, 3857],
    imageFormat: 'image/png',
    version: '1.1.1'
  })
  return WL
}

调用:

let tdtylayer = await tdtlayer().then(res => { return res })

 

 

 

 

钻研不易,转载请注明出处。。。。。

 

posted @ 2019-11-04 15:37  莫小龙  阅读(1685)  评论(0编辑  收藏  举报