WMSLayer空间查询组件
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ys |
Object | YouScene对象 | ||||||||||||
options |
Object |
对象有下面这些属性:
|
- Implements:
Example:
var youScene = new YS.YouScene({sdkServerUrl: 'http://ys.infoearth.com:9090/Server/'});
youScene.init("global");
var wMSLayerControl = new YS.WMSLayerControl(youScene,{});
var wmsLayer = youScene.layers.addWMSLayer({
id: 'wmsLayer',
url: 'https://mesonet.agron.iastate.edu/cgi-bin/wms/goes/conus_ir.cgi',
layers: 'goes_conus_ir',
tileWidth: 256,
tileHeight: 256,
minimumLevel: 0,
maximumLevel: 20,
name: 'wms_test',
category: 'WMS测试',
isAddTree: true
});
wmsLayer._clickEvent.addEventListener(function (promise) {
promise.then(function (data) {
if (data && data.length > 0) {
wMSLayerControl.clean();
wMSLayerControl.addEntity(data);
wMSLayerControl.addTableHtml(data);
}
}).otherwise(function (err) {
})
})
Demo:
Methods
-
根据查询到的数据生成实体
Name Type Description data
Array 数据查询到的数据 -
生成html数据并显示在页面上
Name Type Description data
Array 数据查询到的数据 -
清理组件的临时数据、成果等
- Implements:
-
销毁组件 重载时请务必调用
IControl.prototype.destroy.apply(this);
Returns:
- Implements:
-
该组件是否销毁 (true代表销毁了,false代表未销毁), 销毁后将不可以再使用
Returns:
- Implements: