Skip to content

terrain_control

Stable

A button that turns 3D terrain on and off.

Generated from the component's definition in the library, so it always matches the version this demo runs.

Attribute Type Default Description
id required string — Unique identifier for the control
map_id required string — ID of the map
position string "top-right" Position on map: "top-left", "top-right", "bottom-left", "bottom-right" (default: "top-right"). A new value moves the control to that corner, terrain state and all
terrain_source_id required string — ID of the RasterDEMSource to use. A new value applies to the terrain at once while it is on
exaggeration float 1.5 Terrain exaggeration factor when enabled (default: 1.5). A new value applies as terrain_source_id does
enabled boolean false Initial terrain state (default: false). A new value after mount switches the terrain on or off, as a click on the button does but with no terrain_control:toggled; a render that leaves it as it was keeps the state the user chose
events any [] a list of event names, or :all