Geoportal Extension for Leaflet API Reference

Namespace: LayerSwitcher

L.geoportalControl.LayerSwitcher

Leaflet Control Class to manage map layers : their order, visibility and opacity, and display their informations (title, description, legends, metadata...)

Use L.geoportalControl.LayerSwitcher() factory to create instances of that class.

Extends Leaflet L.Control.Layers native class.

Methods

addLayer(layer)

Leaflet/Controls/LayerSwitcher.js, line 727

Adding a layer to be displayed by the control.

Name Type Description
layer Object

L.TileLayer or L.TileLayer.WMS

addLayerConfig(layerConfig)

Leaflet/Controls/LayerSwitcher.js, line 737

Adding layer configuration to be displayed by the control

Name Type Description
layerConfig Object

See L.geoportalControl.LayerSwitcher() for layer display config object definition.