Skip to content

image_source

Stable

Places an image at four coordinates for a raster layer to draw.

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.

  • source:added

    Fired once, with source_id, the first time the source is on the map (not again when a style change, or a map rendered again with the same id, puts it back)

    Not received yet.

  • source:removed

    Fired, with source_id, once the source is gone after the component is removed, if source:added was fired

    Not received yet.

  • source:error

    Fired when MapLibre fails to add or replace the source

    Not received yet.