Class: LayerSwitcherImage

ol.control. LayerSwitcherImage

OpenLayers Layer Switcher Control.


new LayerSwitcherImage( [options])

Parameters:
Name Type Argument Description
options Object <optional>

Control options.

Extends

Members


tip

List of tips for internationalization purposes

Inherited From:

Methods


_getLayerForLI(li)

Get the layer associated with a li

Parameters:
Name Type Description
li Element
Inherited From:
Returns:
Type
ol.layer

_setLayerForLI(li, layer)

Set the layer associated with a li

Parameters:
Name Type Description
li Element
layer ol.layer
Inherited From:

displayInLayerSwitcher(layer)

Test if a layer should be displayed in the switcher

Parameters:
Name Type Description
layer ol.layer
Inherited From:
Returns:

true if the layer is displayed

Type
boolean

drawList(element)

Render a list of layer

Parameters:
Name Type Description
element elt

to render

Overrides:

drawPanel()

Draw the panel control (prevent multiple draw due to layers manipulation on the map with a delay function)

Inherited From:

hide()

Hide control

Inherited From:

isOpen()

Is control open

Inherited From:
Returns:
Type
boolean

overflow()

Disable overflow

Overrides:

setHeader(html)

Add a custom header

Parameters:
Name Type Description
html Element | string

content html

Inherited From:

setMap(map)

Set the map instance the control is associated with.

Parameters:
Name Type Description
map _ol_Map_

The map instance.

Inherited From:

show()

Show control

Inherited From:

switchLayerVisibility(l, related)

Change layer visibility according to the baselayer option

Parameters:
Name Type Description
l ol.layer
related Array.<ol.layer>

layers

Inherited From:

testLayerVisibility(layer)

Check if layer is on the map (depending on zoom and extent)

Parameters:
Name Type Description
layer ol.layer
Inherited From:
Returns:
Type
boolean

toggle()

Toggle control

Inherited From: