RouteEditControl

飞行路线编辑组件

new YS.RouteEditControl(ys, options)

飞行路线编辑组件
Name Type Description
ys Object YouScene对象
options Object 对象有下面这些属性:
Name Type Default Description
userId String optional 用户userId
isDrag Boolean true optional 组件是否可以拖拽(默认值为true)
className String optional 自定义组件的class名
closeDepth String true optional 飞行点不开启深度检测
wrapperId string optional 需要将组件放在哪个div里面,默认放在body里面
Implements:
Example:
var youScene = new YS.YouScene({sdkServerUrl: 'http://ys.infoearth.com:9090/Server/'});
youScene.init("global");

var routeEditControl = new YS.RouteEditControl(youScene,{});

//销毁组件
routeEditControl.destroy();
Demo:

Members

isDrag : Boolean

组件是否可以拖动
Implements:
See:
  • IControl.DOM

Methods

destroy()Undefined

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

exportPathPoints()Object

导出飞行路线
Returns:
返回飞行路线对象

flyDistance()Object

飞行总距离及当前已飞行的距离
Returns:
返回飞行总距离及当前已飞行的距离对象

importPathPoints(flyPathPoints)

导入飞行路线
Name Type Description
flyPathPoints Array.<Object> 要导入的飞行路线
See:

isDestroyed()Boolean

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

Events

editClose

点击X关闭飞行组件事件