L.Class powers the OOP facilities of Leaflet and is used to create almost all of the Leaflet classes documented.
Creates a control with the given options.
Adds a legend to the legendControl.
any
Adds the control to the map.
Returns the HTML container of the control.
HTMLElement
Returns the current position of the control.
string
any
Optional, should contain all clean up code (e.g. removes control's event listeners). Called on map.removeControl(control) or control.removeFrom(map). The control's DOM container is removed automatically.
Removes the control from the map.
Removes a legend from the legendControl.
any
Sets the position of the control. See control positions.