SpatialQueryControl

空间查询组件

new YS.SpatialQueryControl(ys)

空间查询组件
Name Type Description
ys Object YouScene对象
Implements:
Example:
var youScene = new YS.YouScene({sdkServerUrl: 'http://ys.infoearth.com:9090/Server/'});
youScene.init("global");

var spatialQuery = new YS.SpatialQueryControl(youScene);

//点选查询
spatialQuery.queryFeatureByPtTolerance('http://ecloud.infoearth.com:9997', 'spatialquery');

//框选查询
spatialQuery.queryFeatureByRect('http://ecloud.infoearth.com:9997', 'spatialquery');

//结束查询
spatialQuery.destroy();
Demo:

Methods

abstractclean()

清理组件的临时数据、成果等
Implements:

closeSpatialQuery()

关闭空间查询

destroy()Undefined

销毁组件 重载时请务必调用IControl.prototype.destroy.apply(this);
Returns:
Implements:

getOneInfoByID(url, dsKey, fid)Object

根据元素ID返回属性并画线
Name Type Description
url String 请求Url
dsKey String 图层Key
fid Number 元素ID
Returns:
属性表

isDestroyed()Boolean

该组件是否销毁 (true代表销毁了,false代表未销毁), 销毁后将不可以再使用
Returns:
Implements:

queryFeatureByLine(url, dsKey, shpField)

矢量数据服务 - 线选查询
Name Type Description
url String 请求Url
dsKey String 图层Key
shpField String shpField

queryFeatureByPtTolerance(url, dsKey, shpField)

矢量数据服务 - 有容差值的点选查询
Name Type Description
url String 请求Url
dsKey String 图层Key
shpField String shpField

queryFeatureByRect(url, dsKey, shpField)

矢量数据服务 - 框选查询
Name Type Description
url String 请求Url
dsKey String 图层Key
shpField String shpField