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 floating panel that can be moved around the map
- Inline - Shows legend entries inline under each layer in the layer control
- Both - Displays the legend in both panel and inline modes 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 Categories
The legend automatically categorizes and displays:
- 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 control positioning options. The legend automatically scales and adapts to your map's theme and styling.