WMSConnector

WMS服务连接器,用于获取WMS服务元数据

new CooWasm.WMSConnector(props)

创建WMS服务连接器

Name Type Description
props Object

配置选项

Name Type Default Description
url String

WMS服务地址

version String '1.3.0' optional

WMS服务版本

Extends

Members

readonlyserviceType : EnumOGCType

服务类型 (WMS/WMTS)

Inherited From:

url : String

服务地址

Inherited From:

version : String

服务版本

Inherited From:

Methods

protected_buildUrl(params)String

构建请求URL,附加服务类型和版本参数

Name Type Description
params Object

请求参数

Returns:

完整的请求URL

Inherited From:

protected_extractLayers(capabilities)Array.<Object>

从能力文档中提取图层信息

Name Type Description
capabilities Document

XML能力文档

Returns:

图层信息数组

Inherited From:

protected_findLayerByName(layers, layerName)Object|null

在图层列表中查找指定名称的图层

Name Type Description
layers Array

图层列表

layerName String

图层名称

Returns:

图层信息对象

Inherited From:

protected_getElementText(node, tagName)String|null

获取XML节点中指定元素的文本内容

Name Type Description
node Element

父节点

tagName String

子节点标签名

Returns:

文本内容

Inherited From:

protected_parseXML(text)Document

解析XML文本

Name Type Description
text String

XML文本

Returns:

XML文档对象

Inherited From:

protected_request(url, callback)

执行HTTP请求

Name Type Description
url String

请求URL

callback function

回调函数,参数为(error, response)

Inherited From:

getCapabilities(callback)

获取WMS服务能力信息

Name Type Description
callback function

回调函数,参数为(error, capabilities)

getLayerInfo(layerName, callback)

获取图层详细信息

Name Type Description
layerName String

图层名称

callback function

回调函数,参数为(error, layerInfo)

Inherited From:

getLayerInformation(layerName, callback)

获取指定图层的WMSInformation对象

Name Type Description
layerName String

图层名称

callback function

回调函数,参数为(error, wmsInfo)

getLayers(callback)

获取图层名称列表

Name Type Description
callback function

回调函数,参数为(error, layerNames)

Inherited From:

getLayersInfo(callback)

获取完整的图层信息对象列表

Name Type Description
callback function

回调函数,参数为(error, layerInfos)

Inherited From: