Terrain

A style's terrain property is a global modifier that elevates layers and markers based on a DEM data source.

"terrain": {
    "source": "mapbox-raster-dem",
    "exaggeration": 2
}

Terrain is supported only in globe and mercator projections.

source

Required string.

Name of a source of raster_dem type to be used for terrain elevation.

SDK SupportMapbox GL JSAndroid SDKiOS SDKmacOS SDK

basic functionality

>= 2.0.0>= 10.0.0>= 10.0.0Not yet supported

exaggeration

Optional number between 0 and 1000 inclusive. Defaults to 1. Requires source. Supports interpolateexpressions. Transitionable.

Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.

SDK SupportMapbox GL JSAndroid SDKiOS SDKmacOS SDK

basic functionality

>= 2.0.0>= 10.0.0>= 10.0.0Not yet supported