Interface: LayerControl
Defined in: spec/types.ts:779
A floating panel that expands to reveal one toggle button per
LayerControlItem. Rendered by <GeoVisLayerControl>, which
<GeoVisProvider> auto-mounts when spec.control is set.
Properties
icon?
optionalicon?:string
Defined in: spec/types.ts:803
Icon shown on the collapsed trigger button, as a @ttoss/react-icons name
(e.g. 'lucide:layers'). When omitted a built-in stacked-sheets glyph is
used, so the trigger looks identical without configuration.
id
id:
string
Defined in: spec/types.ts:781
Unique identifier for the panel.
items
items:
LayerControlItem[]
Defined in: spec/types.ts:820
The toggle buttons revealed when the panel is expanded.
label?
optionallabel?:string
Defined in: spec/types.ts:797
Text shown on the collapsed trigger button. Defaults to 'Layers'.
maxVisibleItems?
optionalmaxVisibleItems?:number
Defined in: spec/types.ts:818
How many items the expanded panel shows before collapsing the rest behind
a "Ver mais" card. Clicking that card opens a larger panel listing every
item, which stays open until dismissed (close button, Escape or a click
outside) even for the 'hover' trigger. The first maxVisibleItems of
items, in order, are the ones shown. When omitted — or when items has
no more than this many entries — every item is shown and no card appears.
offset?
optionaloffset?:number| {x?:number;y?:number; }
Defined in: spec/types.ts:795
Distance in pixels from the anchored map edges. Defaults to 40. A single
number applies to both edges; pass { x, y } to offset each axis
independently (each falling back to 40 when omitted) — e.g. push the
control clear of a side panel horizontally without lifting it off the
bottom edge. Increase it to clear map chrome (e.g. MapLibre's attribution)
or app UI.
position?
optionalposition?:LegendPosition
Defined in: spec/types.ts:786
Corner the panel is anchored to (absolute overlay), reusing the legend
position vocabulary. Defaults to 'bottom-left'.
trigger?
optionaltrigger?:"hover"|"click"
Defined in: spec/types.ts:809
How the panel expands to reveal its items. 'hover' (default) expands on
pointer/focus enter; 'click' toggles on trigger click. Both triggers
still respond to a click so touch devices can open a hover panel.