What it does
This is the legend shown differently. Instead of a list, layers are shown as slabs stacked in perspective, in the order the map draws them.
The basemap is at the bottom, with other layers over it. Dragging a slab to a different depth changes what covers what.
Each slab has the same actions as a legend row: visibility, opacity, zoom to extent, description, style, and remove. It shares the same dialogs as the flat legend.
Use the flat legend for short layer lists. Use the stack when the main question is which layers cover others.
Using it
- Drag a slab up or down to reorder the map.
- Use a slab's controls exactly as you would a legend row's.
In your own map
Add layerLegend3d to a toolbar. The 3D legend reads the same layer state as the flat legend, so the two can coexist and stay in sync.
Extending it
The 3D legend uses the same info, style, save, permalink, and clear dialogs as the flat legend. Keep behavior in the shared components.
Config type | layerLegend3d |
|---|---|
| Element | <webmapx-layer-legend3d> |
| Placement | toolbar |
| Source | src/components/webmapx-layer-legend3d.ts |
| Tests | tests/tool-registration.test.ts |
| Related | layerOverview, 3d, layerTree |