Skip to content

legend

Stable

Says what the colours and symbols of the map mean, in a corner of the map, and hides and shows layers from its entries.

The events this component sends to the LiveView, as the library documents them. Each arrives in handle_event/3. Use the preview; the last payload of each event the example receives appears here. A component sends only the events its events attribute names, so the example receives those its LiveView handles.

  • legend:layer_toggled

    the user pressed an item with layers: %{"legend_id" => id, "layers" => layers, "visible" => visible}, the item's layers and whether they are shown now. Pushed only when events names it; the layers are hidden or shown in the browser either way.

    Not received yet.