ModelMoveControl

模型移动组件

new YS.ModelMoveControl(ys, options)

模型移动组件
Name Type Description
ys Object YouScene对象
options Object 对象有下面这些属性:
Name Type Default Description
x Number 0 optional 模型移动组件距离屏幕左侧的距离
y Number 0 optional 模型移动组件距离屏幕上侧的距离
isDrag Boolean true optional 组件是否可以拖拽(默认值为true)
className String optional 组件的自定义class名
Implements:
Example:
var youScene = new YS.YouScene({sdkServerUrl: 'http://ys.infoearth.com:9090/Server/'});
youScene.init("global");

var modelMoveControl = new YS.ModelMoveControl(youScene, { x: 500, y: 200 });

modelMoveControl.move(feature);
Demo:

Methods

abstractclean()

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

destroy()Undefined

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

isDestroyed()Boolean

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

move(feature)Feature

生成模型移动组件
Name Type Description
feature Object feature对象(只能为ModelLayer对象或者SceneLayer对象)
Returns:
返回被移动的对象