Skip to Content
EditorLegend

Legend

A legend explains the symbols and colors used on a map. It is an optional module: open the Legend panel and enable it to get started. Legend items can also act as toggles that show or hide groups of map elements.

Options

NameDescription
PositionCorner the legend control sits in (top-left, top-right, bottom-left, bottom-right). Click the selected arrow again to disable it.
TitleOptional heading shown above the legend. Leave blank for no title.
ToggleMake the legend collapsible to save space on smaller screens.
By defaultWhen toggleable, whether the legend starts Opened or Closed.
ColumnsNumber of columns used to lay out the items. Defaults to 1.

Legend items

Add items from the Legend items list. Each item renders a symbol and a label.

PropertyDescription
TextVisible label of the item.
IconIcon URL used as the symbol. If the value is 3 characters or less, it is shown as placeholder text instead.
ColorBackground color of the symbol.
ActionWhat clicking the item does — No action, or Toggle CSS (see below).

Toggle CSS action

When an item’s Action is set to Toggle CSS, clicking it shows or hides every element matching a CSS selector — handy for letting users turn whole categories of markers or shapes on and off.

PropertyDescription
SelectorCSS selector matching the elements to toggle.
By defaultWhether the matched elements start shown or hidden.

Advanced options

PropertyDescription
ID *Unique identifier of the item.
ScaleSymbol scale for slight resizing (0–1, default 1).
RadiusBorder radius of the symbol in pixels (default 4).
DisableTemporarily hide the item.
* Required fields

The symbol color also supports a separate dark-theme value. For the full field list see the Legend item schema, and the Legend settings for the related options.

Last updated on