HillshadeLayer

@Composable
fun HillshadeLayer(id: String, source: Source, minZoom: Float = 0.0f, maxZoom: Float = 24.0f, visible: Boolean = true, shadowColor: Expression<ColorValue> = const(Color.Black), highlightColor: Expression<ColorValue> = const(Color.White), accentColor: Expression<ColorValue> = const(Color.Black), illuminationDirection: Expression<FloatValue> = const(355f), illuminationAnchor: Expression<IlluminationAnchor> = const(IlluminationAnchor.Viewport), exaggeration: Expression<FloatValue> = const(0.5f))(source)

Client-side hillshading visualization based on DEM data. The implementation supports Mapbox Terrain RGB, Mapzen Terrarium tiles and custom encodings.

Parameters

id

Unique layer name.

source

Vector data source for this layer.

minZoom

The minimum zoom level for the layer. At zoom levels less than this, the layer will be hidden. A value in the range of [0..24].

maxZoom

The maximum zoom level for the layer. At zoom levels equal to or greater than this, the layer will be hidden. A value in the range of [0..24].

visible

Whether the layer should be displayed.

shadowColor

The shading color of areas that face away from the light source.

highlightColor

The shading color of areas that faces towards the light source.

accentColor

The shading color used to accentuate rugged terrain like sharp cliffs and gorges.

illuminationDirection

The direction of the light source used to generate the hillshading in degrees. A value in the range of [0..360). 0 means the top of the viewport or north, depending on the value of illuminationAnchor.

illuminationAnchor

Direction of light source when map is rotated. See illuminationDirection.

exaggeration

Intensity of the hillshade. A value in the range of [0..1].