Layer(param)

new Layer(param)

构造函数

Parameters:
Name Type Description
param Object
Properties
Name Type Attributes Default Description
id String <optional>
图层 ID
visible Boolean <optional>
true 显示/隐藏
visibleLevel Array.<Number> <optional>
可见层级 默认全部级别可见
renderOrder Number <optional>
0 渲染顺序
offsetHeight Number <optional>
0 离地高度
complete function <optional>
图层创建完毕后的回调函数
Author:
  • caihuimin

Members

id :String

获取/设置 图层ID

readonly loadStatus :LayerLoadStatus

获取图层的加载状态

offsetHeight :Number

获取/设置图层离地高度

Default Value:
  • 0

visible :Boolean

获取/设置 图层是否可见

Default Value:
  • true

visibleLevel :Array.<Number>

获取/设置图层的可见层级

Methods

destroy() → {Boolean}

销毁图层

Returns:
Boolean

destroyScanning()

移除扫光

hide()

隐藏图层

pauseScanning()

暂停扫光

resumeScanning()

恢复扫光

show()

显示图层

startScanning(params)

开始扫光

Parameters:
Name Type Description
params Object 扫光参数
Properties
Name Type Attributes Description
type THING.EARTH.ScanningType <optional>
扫描类型
mode THING.EARTH.ScanningMode <optional>
扫描模式
angle Number <optional>
扫描角度,默认为0
speed number <optional>
扫描速度,默认为1。
color Array <optional>
扫描颜色,默认为白色。
opacity number <optional>
扫描透明度,默认为1。
blending boolean <optional>
是否启用混合,默认为true。
effect boolean <optional>
是否启用发光,默认为false。

stopScanning()

停止扫光

Events

Destroyed

Load

LoadError

LoadStart