Class: OGCServices

OGCServices

OGCServices 类,用于获取 OGC 常见服务中相关要素属性

this.$viewer.on(MouseEventType.CLICK, evt => {
  const { _lng, _lat } = evt.cartographic
  const url = 'http://221.226.186.58:28119/geoserver/panjin/wms?SERVICE=WMS&VERSION=1.1.1' +
  '&REQUEST=GetFeatureInfo&FORMAT=image%2Fpng&TRANSPARENT=true&QUERY_LAYERS=panjin%3AerpBounds' +
  '&STYLES&LAYERS=panjin%3AerpBounds&exceptions=application%2Fvnd.ogc.se_inimage&INFO_FORMAT=application/json' +
  '&FEATURE_COUNT=50&X=50&Y=50&SRS=EPSG%3A4326&WIDTH=101&HEIGHT=101'
  OGCServices.getWMSInfo({
    url,
    lng: _lng,
    lat: _lat
  }).then(res => {
    console.log(res)
  })
})

new OGCServices()

app/ogc/OGCServices.js, line 28

Classes

OGCServices

Methods

staticOGCServices.getWFSInfo(options)

app/ogc/OGCServices.js, line 66

获取 WFS 服务中要素的信息

Name Type Description
options Object

可选参数

Name Type Description
lng number

拾取点经度

lat number

拾取点纬度

url string

wms 服务地址

staticOGCServices.getWMSInfo(options)

app/ogc/OGCServices.js, line 39

获取 WMS 服务中要素的信息

Name Type Description
options Object

可选参数

Name Type Default Description
lng number

拾取点经度

lat number

拾取点纬度

url string

wms 服务地址

tolerance number 0.0001 optional

wms 服务 BBOX 容差