* OpenLayers LayerSwitcher Control, displays a list of layers and groups
* associated with a map which have a `title` property.
*
* To be shown in the LayerSwitcher panel layers must have a `title` property;
* base map layers should have a `type` property set to `base`. Group layers
* (`LayerGroup`) can be used to visually group layers together; a group
* with a `fold` property set to either `'open'` or `'close'` will be displayed
* with a toggle.
*
* See [BaseLayerOptions](#baselayeroptions) for a full list of LayerSwitcher
* properties for layers (`TileLayer`, `ImageLayer`, `VectorTile` etc.) and
* [GroupLayerOptions](#grouplayeroptions) for group layer (`LayerGroup`)
* LayerSwitcher properties.
*
* Layer and group properties can either be set by adding extra properties
* to their options when they are created or via their set method.
*
* Specify a `title` for a Layer by adding a `title` property to it's options object:
* ```javascript
* var lyr = new ol.layer.Tile({
* // Specify a title property which will be displayed by the layer switcher
* title: 'OpenStreetMap',
* visible: true,
* source: new ol.source.OSM()
* })
* ```
*
* Alternatively the properties can be set via the `set` method after a layer has been created:
* ```javascript
* var lyr = new ol.layer.Tile({
* visible: true,
* source: new ol.source.OSM()
* })
* // Specify a title property which will be displayed by the layer switcher
* lyr.set('title', 'OpenStreetMap');
* ```
*
* To create a LayerSwitcher and add it to a map, create a new instance then pass it to the map's [`addControl` method](https://openlayers.org/en/latest/apidoc/module-ol_Map-Map.html#addControl).
* ```javascript
* var layerSwitcher = new LayerSwitcher({
* reverse: true,
* groupSelectStyle: 'group'
* });
* map.addControl(layerSwitcher);
* ```
*
* @constructor
* @extends {ol/control/Control~Control}
* @param opt_options LayerSwitcher options, see [LayerSwitcher Options](#options) and [RenderOptions](#renderoptions) which LayerSwitcher `Options` extends for more details.