Class: ClientLayer

ClientLayer

A client rendered layer object. Uses JSON data retrieved from the server in conjunction with a Renderer object or html function to create interactable DOM elements.

new ClientLayer(spec)

Instantiate a ClientLayer object.
Name Type Description
spec Object The specification object.
{
    opacity  {float}    - The opacity of the layer. Default = 1.0
    enabled  {boolean}  - Whether the layer is visible or not. Default = true
    zIndex   {integer}  - The z index of the layer. Default = 1000
    renderer {Renderer} - The tile renderer object.
}

Extends

Methods

addAggregator(id, renderer)

Adds an aggregator to the layer.
Name Type Description
id String The aggregator id.
renderer Renderer The renderer to attach to the layer.

getAggregator(id)

Gets an aggregator by id.
Name Type Description
id String The aggregator id.

inherited getChannel(){String}

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

getLevelMinMax(The)

Get the current minimum and maximum values for the current zoom level.
Name Type Description
The Object min and max of the level.

inherited getOpacity(){float}

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

getQueryParamString(){String}

Generate query parameters based on state of layer
Returns:
query parameter string based on the attributes of this layer.

getTheme(){String}

Get the current theme for the layer.
Returns:
theme identifier string.

getTileTransformData(){Object}

Get the transformer data attribute.
Returns:
tile transform data attribute.

getTileTransformType(){String}

Get the layers transformer type.
Returns:
tile transform type.

inherited getUUID(){String}

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

getZIndex(){integer}

Get the layers zIndex.
Returns:
zIndex for the layer.

inherited isEnabled(){boolean}

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

inherited setEnabled(enabled)

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

inherited setOpacity(opacity)

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

setRenderer(renderer)

Sets the current renderer of the layer.
Name Type Description
renderer Renderer The renderer to attach to the layer.

setTheme(theme)

Updates the theme associated with the layer.
Name Type Description
theme String The theme identifier string.

setTileTransformData(transformData)

Set the tile transform data attribute
Name Type Description
transformData Object The tile transform data attribute.

setTileTransformType(transformType)

Set the layers tile transform function type.
Name Type Description
transformType String The tile transformer type.

setZIndex(zIndex)

Set the z index of the layer.
Name Type Description
zIndex integer The new z-order value of the layer, where 0 is front.