Legend

The Legend control displays visual explanations for the symbols, colors, and styling used in your map layers. It helps viewers understand what different features represent.

Enabling the Legend

You can enable the Legend control in the Map Controls settings. Once enabled, the legend panel appears on your map and automatically displays legend entries based on your configured layers.

Legend Display Modes

The legend supports different display modes to fit your map layout:

  • Panel - Displays the legend as a panel pinned to a corner of the map
  • In layer control - Shows legend entries inline under each layer in the Layer Control. This mode requires the Layer Control to be enabled (User Interface card); if it is not, the legend falls back to the panel so it always remains visible
  • Both - Displays the legend in both the panel and the layer control simultaneously

Configuring Layer Legends

For each layer, you can customize its legend appearance:

  • Include in Legend - Toggle whether this layer's legend should be displayed
  • Legend Title - Set a custom title for the layer's legend section
  • Show Field Names - Display field names alongside legend values

Legend Entry Types

Depending on how each layer is styled, its legend entries are automatically rendered as one of the following:

  • Color swatches - For categorical data with distinct colors
  • Gradient scales - For continuous data with color ramps
  • Size ramps - For data represented by symbol size
  • Icons - For point features with symbol icons
  • Lines - For line feature styling
  • Images - For raster or image-based layers
  • Notes - Additional information about the layer styling

Styling and Positioning

You can position the legend in any corner of the map using the Position option; the panel is not draggable. When the legend shares a corner with other map controls (such as the zoom control) it is placed below them. The legend automatically scales and adapts to your map's theme and styling.