FixedLabelLayer

固定文字图层

new YS.FixedLabelLayer(options, global)

固定文字图层
Name Type Description
options Object 对象有下面这些属性:
Name Type Description
id String optional 唯一标识,不传自动生成
name String optional 名称
visible Boolean optional 是否可见
global Object 三维球对象(YouScene.earth)
Implements:
Demo:

Members

visible : Boolean

获取或设置是否可见

Methods

add(fixedLabel)fixedLabel

添加固定文字到图层
Name Type Description
fixedLabel FixedLabel 固定文字子类
Returns:
返回添加的固定文字类对象

clear()

清空所有固定文字

getById(id)FixedLabel

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

removeById(id)Boolean

通过id移除FixedLabel
Name Type Description
id String 唯一标识符
Returns:
删除成功返回true, 删除失败返回false

Events

click

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

mouseHover

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

mouseOut

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