Skip to content

terrain

Stable

Renders 3D terrain from a raster DEM source, with adjustable exaggeration.

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.

  • terrain:enabled

    Fired once, the first time the terrain is on, with source_id and exaggeration. Not fired again when a style change or a new assign turns it on again

    Not received yet.

  • terrain:disabled

    Fired when the component is removed and turns the terrain off. A terrain that is no longer the component's own (another one was set since) is left on, and the event is not fired

    Not received yet.

  • terrain:error

    Fired, with error, when MapLibre fails to enable the terrain. A source that is not on the map yet is not an error

    Not received yet.