TerrainProfileControl

地形剖面组件

new YS.TerrainProfileControl(ys, options)

地形剖面组件
Name Type Description
ys Object YouScene对象
options Object 对象有下面这些属性:
Name Type Default Description
isDrag Boolean true optional 组件是否可以拖拽(默认值为true)
className String optional 组件自定义的class名
samplingDis Number 1 optional 默认采样点距离
samplingPoint Number 100 optional 默认采样点个数
spamFlavor String 0 optional 默认采样类型为采样点个数采样,0使用采样点个数采样,1使用采样点距离采样
isStatic String false optional 是否是静态,直接通过坐标显示剖面信息
isEntity String true optional 是否显示线和点
Implements:
Example:
var youScene = new YS.YouScene({sdkServerUrl: 'http://ys.infoearth.com:9090/Server/'});
youScene.init("global");

var terrainProfile = new YS.TerrainProfileControl(youScene, {});

//开始量测
terrainProfile.show();

//清除量测结果
terrainProfile.clean();

//结束量测
terrainProfile.destroy();
Demo:

Methods

clean()

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

destroy()Undefined

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

isDestroyed()Boolean

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

show(terrainProfileCallback)TerrainProfileControl

生成地形剖面
Name Type Description
terrainProfileCallback TerrainProfile~terrainProfileCallback 生成剥面图点击按钮×关闭坡面图的回调函数
Returns:
自身
Implements:

Type Definitions

requestCallback(data)

采样间间距函数回调
Name Type Description
data Object data数据