Class: Layer

Layer

A Layer class, the base class for all layer implementations.

new Layer(spec)

Instantiate a Layer object.
Name Type Description
spec Object The specification object.

Methods

getChannel(){String}

Returns the publish/subscribe channel id of this specific layer.
Returns:
publish/subscribe channel for the layer.

getOpacity(){float}

Returns the opacity of the layer.
Returns:
opacity of the layer.

getUUID(){String}

Returns the UUID that uniquely identifies this layer.
Returns:
UUID of the layer.

isEnabled(){boolean}

Get whether or not the layer is enabled.
Returns:
the layer is visible or not.

setEnabled(enabled)

Set whether or not the layer is enabled.
Name Type Description
enabled boolean whether the layer is visible or not

setOpacity(opacity)

Set the opacity of the layer.
Name Type Description
opacity float opacity value from 0 to 1.