Class: LayerLegend

LayerLegend

a wrapper to make a legend

Constructor

new LayerLegend(legendItems, divId, options)

Parameters:
Name Type Description
legendItems Array array of layers or objects with {groupName: {string}, collapse: {boolean}, addCheck: {boolean}, items: {Array}}
divId string the div where the legend should be added
options object for legend
Properties
Name Type Attributes Default Description
layerDivClasses Array <optional>
[] optional array of classes to be applied to the layer legend divs for custom styling
legendTitle string <optional>
Legend the legend title
scaleDependent bool <optional>
true if legend display is scale dependent
Source: