Skip to main content

Function: isLayerControlGroup()

isLayerControlGroup(entry): entry is LayerControlGroup

Defined in: spec/layerControl.ts:18

Whether a layer-control entry is a category rather than a toggle — told apart by its items, since a toggle carries layers instead.

Parameters​

ParameterTypeDescription
entryLayerControlEntryOne of control.items.

Returns​

entry is LayerControlGroup

true for a LayerControlGroup.

Example​

isLayerControlGroup({ id: 'saude', label: 'Saúde', items: [] }); // true
isLayerControlGroup({ id: 'ubs', label: 'UBS', layers: ['ubs'] }); // false