Skip to content

terrain_control

Stable

A button that turns 3D terrain on and off.

The events this component sends to the LiveView, as the library documents them. Each arrives in handle_event/3.

  • terrain_control:toggled

    Fired when the user switches the terrain on or off with the button, once the terrain is on (or off): with enabled, source_id and exaggeration. A terrain waiting for its DEM source is not on yet. A change MapLibre refuses fires no toggled, and neither does a change of enabled from the LiveView

  • terrain_control:error

    Fired when MapLibre refuses to set or remove the terrain, with error; a terrain that cannot be set leaves the control off