WallLayer

墙图层

new YS.WallLayer(options, global)

墙图层
Name Type Description
options Object 对象有下面这些属性:
Name Type Description
id String optional 唯一标识
name String optional 名称
isAddTree Boolean optional 是否加入树
treeIcon String optional 图层树上显示的图标,默认不显示
category String optional 图层分组
visible Boolean optional 是否可见
global Object 三维球对象(YouScene.earth)
Implements:
Example:
var layer = youScene.layers.addWallLayer({
          id:'123',
          name:'213',
      });
Demo:

Members

count : Number

获取线的数量

visible : Boolean

获取或设置是否可见

Methods

add(wall)Wall

添加线到图层
Name Type Description
wall Wall wall
Returns:
返回添加的线对象

clear()

清空walls

destroy()

销毁wallLayer
Implements:

getById(id)Wall

通过ID查询墙
Name Type Description
id String 墙唯一的标识符
Returns:
返回 wall 对象
Implements:

getByIndex(index)Wall

通过索引查询墙
Name Type Description
index String 墙图层索引
Returns:
} 返回 Wall 对象
Implements:

getIndex(id)Nubber

通过ID查询墙的索引
Name Type Description
id String 墙唯一的标识符
Returns:
查得到返回索引,查不到返回-1

remove(wall)

移除墙
Name Type Description
wall Wall 对象

removeById(id)Boolean

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