Layers
The layers control gives users the ability to switch between different base layers and switch overlays on/off (check out the detailed example).
Base layers will be switched with radio buttons, while overlays will be switched with checkboxes.
Note that all base layers should be passed in the base layers object, but only one should be added to the map during map instantiation.
Constructors
Types
The layers control gives users the ability to switch between different base layers and switch overlays on/off (check out the detailed example).
Functions
Adds a base layer (radio button entry) with the given name to the control.
Adds a constructor hook to the class.
Adds an overlay (checkbox entry) with the given name to the control.
Adds the control to the given map.
Returns the HTMLElement that contains the control.
Returns the position of the control.
Merges options into the defaults of the class.
Should return the container DOM element for the control and add listeners on relevant map events. Called on addTo
Optional method. Should contain all clean up code that removes the listeners previously added in onAdd. Called on remove.
Removes the control from the map it is currently active on.
Remove the given layer from the control.
Sets the position of the control.