LayerLegend
a wrapper to make a legend
Constructor Summary
Public Constructor | ||
public |
constructor(legendItems: Array, divId: string, options: object) |
Member Summary
Public Members | ||
public |
$divElement: * |
|
public |
layerGroup: * |
|
public |
legendId: * |
|
public set |
showAll: * |
Public Constructors
public constructor(legendItems: Array, divId: string, options: object) source
Params:
Name | Type | Attribute | 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 |
|
options.layerDivClasses | Array |
|
optional array of classes to be applied to the layer legend divs for custom styling |
options.legendTitle | string |
|
the legend title |
options.scaleDependent | bool |
|
if legend display is scale dependent |