FillExtrusionLayer

@Composable
fun FillExtrusionLayer(id: String, source: Source, sourceLayer: String = "", minZoom: Float = 0.0f, maxZoom: Float = 24.0f, filter: Expression<BooleanValue> = nil(), visible: Boolean = true, translate: Expression<DpOffsetValue> = const(DpOffset.Zero), translateAnchor: Expression<TranslateAnchor> = const(TranslateAnchor.Map), opacity: Expression<FloatValue> = const(1f), color: Expression<ColorValue> = const(Color.Black), pattern: Expression<ImageValue> = nil(), height: Expression<FloatValue> = const(0f), base: Expression<FloatValue> = const(0f), verticalGradient: Expression<BooleanValue> = const(true), onClick: FeaturesClickHandler? = null, onLongClick: FeaturesClickHandler? = null)(source)

A fill extrusion layer draws polygons from the sourceLayer in the given source in the given style as a series of extruded polygon fills, i.e. a polygon with a certain extent on the z-axis. If nothing else is specified, these 3D polygons will be black and flat.

Parameters

id

Unique layer name.

source

Vector data source for this layer.

sourceLayer

Layer to use from the given vector tile source.

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].

filter

An expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The featureState expression is not supported in filter expressions.

visible

Whether the layer should be displayed.

translate

The geometry's offset relative to the translateAnchor. Negative numbers indicate left and up (on the flat plane), respectively.

translateAnchor

Frame of reference for offsetting geometry.

Ignored if translate is not set.

opacity

The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available. A value in range [0..1].

color

The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root light settings. The alpha component of the specified color is ignored. Ignored if pattern is specified.

pattern

Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.

height

The height in meters with which to extrude the geometries, i.e. the upper end of the 3D polygon. A value in the range of [0..infinity).

base

The height in meters with which to extrude the base of the geometries, i.e. the lower end of the 3D polygon. A value in the range of [0..infinity). Must be less than or equal to height.

verticalGradient

Whether to apply a vertical gradient to the sides of this layer. If true, sides will be shaded slightly darker farther down.

onClick

Function to call when any feature in this layer has been clicked.

onLongClick

Function to call when any feature in this layer has been long-clicked.