Constructor
new Legend()
Custom Leaflet control which will display a legend for colour-coded values.
Options:idUnique id for the controlpositionThe location on the map (using leaflet's standard control positions). Default: bottomrightcollapseTrue to show a button until clicked, then show the legendbox; false to just show the expanded legend box. Default: falselabelThe label to give to the list of legend colours, set to null for no label. Default: nulltitleThe title the button when collapse=true. Default: 'Show legend'itemsarray of items to be displayed in the legend. Each item is an object with the following properties:redRed value for the RGB colour indicatorgreenGreen value for the RGB colour indicatorblueBlue value for the RGB colour indicatornameThe text to be displayed
iconClassThe CSS class(es) for the button icon (if collapse=true). Default: 'fa fa-list'legendListClassThe CSS class(es) legend list container. Default: none