FloatLayer

浮动图层基类

new YS.FloatLayer(options, global)

浮动图层
Name Type Description
options Object 对象有下面这些属性:
Name Type Default Description
id String optional 唯一标识
name String optional 名称
isAddTree Boolean true optional 是否加入树
visible Boolean true optional 是否可见
treeIcon String optional 图层树上显示的图标,默认不显示
category String optional 图层分组
global Object 三维球对象(YouScene.earth)
Implements:
See:

Methods

destroy()

销毁
Implements:

abstractgetById(id)Feature

根据id获取图层内对象
Name Type Description
id String 对象的id
Returns:
返回查找到的对象,找不到返回undefined

abstractgetByIndex(index)Feature

根据索引获取图层内对象
Name Type Description
index Number 对象的索引号,[0, count)
Returns:
返回查找到的对象,找不到返回undefined

Events

click

图标点击事件(如果子类的click被调用,那么这个事件不会生效)

featureAdded

添加要素事件
Name Type Description
layer FloatLayer 触发事件的对象
feature Feature 被添加的要素对象

featureCleared

要素清除事件
Name Type Description
layer FloatLayer 触发事件的对象

featureEdit

要素编辑事件
Name Type Description
layer FloatLayer 触发事件的对象
feature Feature 被编辑的要素对象

featureRemoved

要素删除事件
Name Type Description
layer FloatLayer 触发事件的对象
feature Feature 被删除的要素对象

mouseHover

鼠标覆盖事件(如果子类的mouseHover被调用,那么这个事件不会生效)

mouseOut

鼠标移出事件(如果子类的mouseOut被调用,那么这个事件不会生效)