Class: BaseLayer

BaseLayer

A base layer object that serves as the underlying layer of the map. Supports blank baselayers that are simply a color, geographic baselayers using the Google Maps API, or standard TMS layers.

new BaseLayer(spec)

Instantiate a BaseLayer object.
Name Type Description
spec Object The specification object.
{
    type    {String}  - The type of baselayer, ["Blank", "Google", "TMS"]. Default = "Blank"
    opacity {float}   - The opacity of the layer. Default = 1.0
    enabled {boolean} - Whether the layer is visible or not. Default = true
    url     {String}  - if TMS layer, the url for tile requests. Default = undefined
    options {Object}  - type specific instantiation attributes. Default = {color:rgb(0,0,0)}
}

Extends

Methods

inherited getChannel(){String}

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

inherited getOpacity(){float}

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

inherited getUUID(){String}

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

inherited isEnabled(){boolean}

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

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.