LayerSwitcher

LayerSwitcher

Custom implementation of LayerSwitcher based on Matt Walker's OL3 control.

Constructor

new LayerSwitcher()

Source:

Methods

renderPanel()

Source:

Generates the panel with all available layers.

setMap()

Source:

Defines the map where the control will be shown.

setVisible(layer, visible)

Source:

Shows or hides the given layer

Parameters:
Name Type Description
layer Layer

The layer to show or hide

visible Boolean

If true, the given layer is shown. If false, it's hidden.