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
| Name | Description |
|---|---|
| Position | Corner the legend control sits in (top-left, top-right, bottom-left, bottom-right). Click the selected arrow again to disable it. |
| Title | Optional heading shown above the legend. Leave blank for no title. |
| Toggle | Make the legend collapsible to save space on smaller screens. |
| By default | When toggleable, whether the legend starts Opened or Closed. |
| Columns | Number 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.
| Property | Description |
|---|---|
| Text | Visible label of the item. |
| Icon | Icon URL used as the symbol. If the value is 3 characters or less, it is shown as placeholder text instead. |
| Color | Background color of the symbol. |
| Action | What 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.
| Property | Description |
|---|---|
| Selector | CSS selector matching the elements to toggle. |
| By default | Whether the matched elements start shown or hidden. |
Advanced options
| Property | Description |
|---|---|
| ID * | Unique identifier of the item. |
| Scale | Symbol scale for slight resizing (0–1, default 1). |
| Radius | Border radius of the symbol in pixels (default 4). |
| Disable | Temporarily hide the item. |
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