Interface: LayerControlItem
Defined in: spec/types.ts:974
One toggle button inside a LayerControl. Clicking it flips the visibility of every referenced layer that exists in the current spec.
Remarks
layers are matched leniently: ids that do not exist in the active spec are
ignored, and when none of them exist the button renders disabled
(greyed, non-interactive) instead of rejecting the spec. This lets a single
control be reused across spec variations where a given layer is only
present in some of them.
Properties
category?
optionalcategory?:string
Defined in: spec/types.ts:1001
Title of the section this item sits under in the "Ver mais" panel, which
groups its items by category — in the order each category first appears
in items — under a heading each. Items without one come first, with no
heading. Only the "Ver mais" panel reads it; the summary and a group's
panel list items flat.
A heading, not a LayerControlGroup: it sorts the full list for reading, where a group is a card that opens a panel of its own.
defaultActive?
optionaldefaultActive?:boolean
Defined in: spec/types.ts:1006
Whether the referenced layers start visible the first time this item is
seen (before the user has toggled it). Defaults to true.
id
id:
string
Defined in: spec/types.ts:980
Stable identity for the item. Its toggled on/off state is remembered by this id, so it persists across spec rebuilds (e.g. switching map modes) even when the underlying layer ids differ between them.
label
label:
string
Defined in: spec/types.ts:982
Text shown on the toggle button.
layers
layers:
string[]
Defined in: spec/types.ts:990
Ids of spec.layers toggled together when the button is clicked.
thumbnail?
optionalthumbnail?:string
Defined in: spec/types.ts:988
Image shown on the item's card in the expanded panel — a URL or data URI rendered to fill the thumbnail square (cropped to cover). When omitted, a built-in stylised map preview is used, so every item looks identical.