Skip to main content

Interface: LayerControlGroup

Defined in: spec/types.ts:946

A category inside a LayerControl: a card that, when clicked, opens a panel with its own toggle buttons rather than toggling anything itself. Groups hold items only — they do not nest.

The card shows how many of its items are on, and renders disabled when every one of them is (none of their layers exist in the current spec).

Example​

{
id: 'saude',
label: 'Saúde',
items: [
{ id: 'ubs', label: 'UBS', layers: ['ubs-pins'] },
{ id: 'hospitais', label: 'Hospitais', layers: ['hospitais-pins'] },
],
}

Properties​

id​

id: string

Defined in: spec/types.ts:948

Stable identity for the category. Must not repeat any item's id.


items​

items: LayerControlItem[]

Defined in: spec/types.ts:957

The toggle buttons the category's panel lists.


label​

label: string

Defined in: spec/types.ts:950

Text shown on the category's card and as its panel's title.


thumbnail?​

optional thumbnail?: string

Defined in: spec/types.ts:955

Image shown on the category's card, as for an item. When omitted, the built-in stylised map preview is used.