Skip to content

geojson_layer

Stable

Draws GeoJSON data as a fill, line, circle, symbol, heatmap or fill-extrusion layer, with optional clustering and feature events.

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.

  • layer:feature_clicked

    Fired when a feature is clicked; for a cluster, with "cluster_id" and "point_count" too (see "Clusters" in the module docs)

    Not received yet.

  • layer:feature_mouseenter

    Fired when mouse enters a feature

    Not received yet.

  • layer:feature_mouseleave

    Fired when mouse leaves a feature

    Not received yet.

  • layer:source_loaded

    Fired once, with sourceId, the first time the layer's own source has loaded (not again on a map rendered again with the same id)

    Not received yet.

  • layer:cluster_leaves_loaded

    The points of a cluster the LiveView asked for (see "Clusters" in the module docs), pushed to it whatever events says, as the answer to its own request; naming it in events changes nothing

    Not received yet.