Class: WMS

.Service. WMS

OGC-WMS服务类。继承GeoGlobe.Service类。

new WMS()

Source:
View2D/Service/WMS.js

Methods


getCapabilities(successFn, failFn)

获取服务能力描述信息。
Parameters:
Name Type Description
successFn function 请求成功的回调函数。
failFn function 请求失败的回调函数。
Source:
View2D/Service/WMS.js

getMap(params, version, layers, styles, srs, width, height, format, bbox)

获取地图内容操作。
Parameters:
Name Type Description
params Object 请求参数,具体内容参考OGC-WMS标准。
version String 版本,默认值是1.1.1。
layers String 图层名称。
styles String 样式,默认是空串。
srs String 默认值是"EPSG:4326"。
width Integer 必选 宽。
height Integer 必选 长。
format String 默认值是"image/jpeg"。
bbox String 必选 范围。
Source:
View2D/Service/WMS.js
Returns:
- 地图内容图片地址。
Type
String
Example
(code)
var url = wmsService.getMap({
    layers: "basic",
    bbox: "-180,-90,180,270",
    width: 256,
    height: 256
});
(end)

initialize(name, url, options)

GeoGlobe.Service.WMS类的构造函数。
Parameters:
Name Type Description
name String 服务名称。
url String 服务地址。
options Object 实例的选项设置,此参数可选。
Source:
View2D/Service/WMS.js

isExist()

将向服务发送“GetCapabilities”同步请求,以检测服务是否存在。 注意,本方法只能验证服务是否存在,并不能保证实际功能完全正常。
Source:
View2D/Service/WMS.js
Returns:
- 服务是否存在。
Type
Boolean