new LayerGroup(groupConfigopt, parentopt)
Parameters:
Name |
Type |
Attributes |
Default |
Description |
groupConfig |
object
|
<optional>
|
{}
|
group configuration object
Properties
Name |
Type |
Attributes |
Default |
Description |
groupName |
string
|
|
|
the group name |
collapse |
boolean
|
<optional>
|
false
|
if the group should be collapsed initially |
addCheck |
boolean
|
<optional>
|
true
|
if the group should have a checkbox controlling visibility of all layers |
|
parent |
LayerGroup
|
<optional>
|
|
the parent group |
- Source:
Methods
_buildLegend(itemIds, theGroup, layerDivClassesopt) → {string}
Parameters:
Name |
Type |
Attributes |
Default |
Description |
itemIds |
Array
|
|
|
the items to process |
theGroup |
LayerGroup
|
|
|
new group |
layerDivClasses |
Array
|
<optional>
|
[]
|
optional classes to apply to the layer divs |
- Source:
Returns:
html string
-
Type
-
string
addGroup(groupConfig, parents) → {LayerGroup}
Parameters:
Name |
Type |
Description |
groupConfig |
object
|
configuration object
Properties
Name |
Type |
Description |
groupName |
string
|
the group name |
collapse |
boolean
|
if the group should be collapsed initially |
addCheck |
boolean
|
if the group should have a checkbox controlling visibility of all layers |
|
parents |
Array.<LayerGroup>
|
parent groups |
- Source:
Returns:
the layer group just added
-
Type
-
LayerGroup
addLegendLayer(newLayer, parents)
Parameters:
Name |
Type |
Description |
newLayer |
LayerBase
|
the layer to be added |
parents |
Array
|
array |
- Source: