new LayerSwitcher( [options])
Parameters:
| Name | Type | Argument | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| options | Object | <optional> | Properties
 | 
Fires:
- event:select
- event:drawlist
- event:toggle
- event:reorder-start
- event:reorder-end
- layer:visible
- layer:opacity
- layer:keydown
Extends
Members
- 
    tip
- 
    
    List of tips for internationalization purposes 
Methods
- 
    displayInLayerSwitcher(layer)
- 
    
    Test if a layer should be displayed in the switcher Parameters:Name Type Description layerol.layer Returns:true if the layer is displayed - Type
- boolean
 
- 
    drawPanel()
- 
    
    Draw the panel control (prevent multiple draw due to layers manipulation on the map with a delay function) 
- 
    getLayerClass(layer)
- 
    
    Select a layer Parameters:Name Type Description layerol.layer.Layer Returns:the layer classname - Type
- string
 
- 
    getPanel()
- 
    
    Get control panel 
- 
    getSelection()
- 
    
    Get selected layer Returns:- Type
- ol.layer.Layer
 
- 
    hide()
- 
    
    Hide control 
- 
    isOpen()
- 
    
    Is control open Returns:- Type
- boolean
 
- 
    selectLayer(layer)
- 
    
    Select a layer Parameters:Name Type Description layerol.layer.Layer 
- 
    setHeader(html)
- 
    
    Add a custom header Parameters:Name Type Description htmlElement | string content html 
- 
    setLayerVisibility(layer, li)
- 
    
    Set visibility for a layer Parameters:Name Type Description layerol.layer.Layer liElement the list element 
- 
    setMap(map)
- 
    
    Set the map instance the control is associated with. Parameters:Name Type Description map_ol_Map_ The map instance. 
- 
    show()
- 
    
    Show control 
- 
    toggle()
- 
    
    Toggle control