RouteFlyControl

飞行组件

new YS.RouteFlyControl(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 飞行点不开启深度检测
Implements:
Example:
var youScene = new YS.YouScene({sdkServerUrl: 'http://ys.infoearth.com:9090/Server/'});
youScene.init("global");

var routeFlyControl = new YS.RouteFlyControl(youScene,{});

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

Methods

staticYS.RouteFlyControl.fly(points, ys)

不调用组件直接飞行,飞行的数据必须和飞行的路线数据格式一样
Name Type Description
points Array.<Object> 数组里面有下列属性:
Name Type Description
Speed Number 速度
x Number 经度
y Number 纬度
z Number 高度
heading Number z轴旋转
pitch Number y轴旋转
roll Number x轴旋转
referenceCenterXYZ Object 飞行路线点坐标{x: ,y: ,z: }
ys YouScene YouScene对象

destroy()Undefined

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

isDestroyed()Boolean

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