terrain_control
StableA button that turns 3D terrain on and off.
No example yet
Its interactive example comes in a later update of the demo. Its events and attributes are already listed.
See its attributesThe 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_idandexaggeration. A terrain waiting for its DEM source is not on yet. A change MapLibre refuses fires notoggled, and neither does a change ofenabledfrom 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