FillExtrusionLayer

fun FillExtrusionLayer(sourceState: SourceState, layerId: String = remember { generateRandomLayerId("fill-extrusion") }, fillExtrusionEdgeRadius: DoubleValue = DoubleValue.INITIAL, fillExtrusionAmbientOcclusionGroundAttenuation: DoubleValue = DoubleValue.INITIAL, fillExtrusionAmbientOcclusionGroundAttenuationTransition: Transition = Transition.INITIAL, fillExtrusionAmbientOcclusionGroundRadius: DoubleValue = DoubleValue.INITIAL, fillExtrusionAmbientOcclusionGroundRadiusTransition: Transition = Transition.INITIAL, fillExtrusionAmbientOcclusionIntensity: DoubleValue = DoubleValue.INITIAL, fillExtrusionAmbientOcclusionIntensityTransition: Transition = Transition.INITIAL, fillExtrusionAmbientOcclusionRadius: DoubleValue = DoubleValue.INITIAL, fillExtrusionAmbientOcclusionRadiusTransition: Transition = Transition.INITIAL, fillExtrusionAmbientOcclusionWallRadius: DoubleValue = DoubleValue.INITIAL, fillExtrusionAmbientOcclusionWallRadiusTransition: Transition = Transition.INITIAL, fillExtrusionBase: DoubleValue = DoubleValue.INITIAL, fillExtrusionBaseTransition: Transition = Transition.INITIAL, fillExtrusionColor: ColorValue = ColorValue.INITIAL, fillExtrusionColorTransition: Transition = Transition.INITIAL, fillExtrusionCutoffFadeRange: DoubleValue = DoubleValue.INITIAL, fillExtrusionEmissiveStrength: DoubleValue = DoubleValue.INITIAL, fillExtrusionEmissiveStrengthTransition: Transition = Transition.INITIAL, fillExtrusionFloodLightColor: ColorValue = ColorValue.INITIAL, fillExtrusionFloodLightColorTransition: Transition = Transition.INITIAL, fillExtrusionFloodLightGroundAttenuation: DoubleValue = DoubleValue.INITIAL, fillExtrusionFloodLightGroundAttenuationTransition: Transition = Transition.INITIAL, fillExtrusionFloodLightGroundRadius: DoubleValue = DoubleValue.INITIAL, fillExtrusionFloodLightGroundRadiusTransition: Transition = Transition.INITIAL, fillExtrusionFloodLightIntensity: DoubleValue = DoubleValue.INITIAL, fillExtrusionFloodLightIntensityTransition: Transition = Transition.INITIAL, fillExtrusionFloodLightWallRadius: DoubleValue = DoubleValue.INITIAL, fillExtrusionFloodLightWallRadiusTransition: Transition = Transition.INITIAL, fillExtrusionHeight: DoubleValue = DoubleValue.INITIAL, fillExtrusionHeightTransition: Transition = Transition.INITIAL, fillExtrusionOpacity: DoubleValue = DoubleValue.INITIAL, fillExtrusionOpacityTransition: Transition = Transition.INITIAL, fillExtrusionPattern: ImageValue = ImageValue.INITIAL, fillExtrusionRoundedRoof: BooleanValue = BooleanValue.INITIAL, fillExtrusionTranslate: DoubleListValue = DoubleListValue.INITIAL, fillExtrusionTranslateTransition: Transition = Transition.INITIAL, fillExtrusionTranslateAnchor: FillExtrusionTranslateAnchorValue = FillExtrusionTranslateAnchorValue.INITIAL, fillExtrusionVerticalGradient: BooleanValue = BooleanValue.INITIAL, fillExtrusionVerticalScale: DoubleValue = DoubleValue.INITIAL, fillExtrusionVerticalScaleTransition: Transition = Transition.INITIAL, visibility: VisibilityValue = VisibilityValue.INITIAL, minZoom: LongValue = LongValue.INITIAL, maxZoom: LongValue = LongValue.INITIAL, sourceLayer: StringValue = StringValue.INITIAL, filter: Filter = Filter.INITIAL)

An extruded (3D) polygon.

See also

Parameters

sourceState

the source that drives this layer.

layerId

the ID of the layer, by default, a random id will be generated with UUID.

fillExtrusionEdgeRadius

Radius of a fill extrusion edge in meters. If not zero, rounds extrusion edges for a smoother appearance. Default value: 0. Value range: 0, 1

fillExtrusionAmbientOcclusionGroundAttenuation

Provides a control to futher fine-tune the look of the ambient occlusion on the ground beneath the extruded buildings. Lower values give the effect a more solid look while higher values make it smoother. Default value: 0.69. Value range: 0, 1

fillExtrusionAmbientOcclusionGroundAttenuationTransition

Defines the transition of fillExtrusionAmbientOcclusionGroundAttenuation. Default value: 0.69. Value range: 0, 1

fillExtrusionAmbientOcclusionGroundRadius

The extent of the ambient occlusion effect on the ground beneath the extruded buildings in meters. Default value: 3. Minimum value: 0.

fillExtrusionAmbientOcclusionGroundRadiusTransition

Defines the transition of fillExtrusionAmbientOcclusionGroundRadius. Default value: 3. Minimum value: 0.

fillExtrusionAmbientOcclusionIntensity

Controls the intensity of shading near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings. Default value: 0. Value range: 0, 1

fillExtrusionAmbientOcclusionIntensityTransition

Defines the transition of fillExtrusionAmbientOcclusionIntensity. Default value: 0. Value range: 0, 1

fillExtrusionAmbientOcclusionRadius

Shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to height of one floor and brings the most plausible results for buildings. This property works only with legacy light. When 3D lights are enabled fill-extrusion-ambient-occlusion-wall-radius and fill-extrusion-ambient-occlusion-ground-radius are used instead. Default value: 3. Minimum value: 0.

fillExtrusionAmbientOcclusionRadiusTransition

Defines the transition of fillExtrusionAmbientOcclusionRadius. Default value: 3. Minimum value: 0.

fillExtrusionAmbientOcclusionWallRadius

Shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to height of one floor and brings the most plausible results for buildings. Default value: 3. Minimum value: 0.

fillExtrusionAmbientOcclusionWallRadiusTransition

Defines the transition of fillExtrusionAmbientOcclusionWallRadius. Default value: 3. Minimum value: 0.

fillExtrusionBase

The height with which to extrude the base of this layer. Must be less than or equal to fill-extrusion-height. Default value: 0. Minimum value: 0.

fillExtrusionBaseTransition

Defines the transition of fillExtrusionBase. Default value: 0. Minimum value: 0.

fillExtrusionColor

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. If this color is specified as rgba with an alpha component, the alpha component will be ignored; use fill-extrusion-opacity to set layer opacity. Default value: "#000000".

fillExtrusionColorTransition

Defines the transition of fillExtrusionColor. Default value: "#000000".

fillExtrusionCutoffFadeRange

This parameter defines the range for the fade-out effect before an automatic content cutoff on pitched map views. Fade out is implemented by scaling down and removing buildings in the fade range in a staggered fashion. Opacity is not changed. The fade range is expressed in relation to the height of the map view. A value of 1.0 indicates that the content is faded to the same extent as the map's height in pixels, while a value close to zero represents a sharp cutoff. When the value is set to 0.0, the cutoff is completely disabled. Note: The property has no effect on the map if terrain is enabled. Default value: 0. Value range: 0, 1

fillExtrusionEmissiveStrength

Controls the intensity of light emitted on the source features. Default value: 0. Minimum value: 0.

fillExtrusionEmissiveStrengthTransition

Defines the transition of fillExtrusionEmissiveStrength. Default value: 0. Minimum value: 0.

fillExtrusionFloodLightColor

The color of the flood light effect on the walls of the extruded buildings. Default value: "#ffffff".

fillExtrusionFloodLightColorTransition

Defines the transition of fillExtrusionFloodLightColor. Default value: "#ffffff".

fillExtrusionFloodLightGroundAttenuation

Provides a control to futher fine-tune the look of the flood light on the ground beneath the extruded buildings. Lower values give the effect a more solid look while higher values make it smoother. Default value: 0.69. Value range: 0, 1

fillExtrusionFloodLightGroundAttenuationTransition

Defines the transition of fillExtrusionFloodLightGroundAttenuation. Default value: 0.69. Value range: 0, 1

fillExtrusionFloodLightGroundRadius

The extent of the flood light effect on the ground beneath the extruded buildings in meters. Default value: 0.

fillExtrusionFloodLightGroundRadiusTransition

Defines the transition of fillExtrusionFloodLightGroundRadius. Default value: 0.

fillExtrusionFloodLightIntensity

The intensity of the flood light color. Default value: 0. Value range: 0, 1

fillExtrusionFloodLightIntensityTransition

Defines the transition of fillExtrusionFloodLightIntensity. Default value: 0. Value range: 0, 1

fillExtrusionFloodLightWallRadius

The extent of the flood light effect on the walls of the extruded buildings in meters. Default value: 0. Minimum value: 0.

fillExtrusionFloodLightWallRadiusTransition

Defines the transition of fillExtrusionFloodLightWallRadius. Default value: 0. Minimum value: 0.

fillExtrusionHeight

The height with which to extrude this layer. Default value: 0. Minimum value: 0.

fillExtrusionHeightTransition

Defines the transition of fillExtrusionHeight. Default value: 0. Minimum value: 0.

fillExtrusionOpacity

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. Default value: 1. Value range: 0, 1

fillExtrusionOpacityTransition

Defines the transition of fillExtrusionOpacity. Default value: 1. Value range: 0, 1

fillExtrusionPattern

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.

fillExtrusionRoundedRoof

Indicates whether top edges should be rounded when fill-extrusion-edge-radius has a value greater than 0. If false, rounded edges are only applied to the sides. Default is true. Default value: true.

fillExtrusionTranslate

The geometry's offset. Values are x, y where negatives indicate left and up (on the flat plane), respectively. Default value: 0,0.

fillExtrusionTranslateTransition

Defines the transition of fillExtrusionTranslate. Default value: 0,0.

fillExtrusionTranslateAnchor

Controls the frame of reference for fill-extrusion-translate. Default value: "map".

fillExtrusionVerticalGradient

Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down. Default value: true.

fillExtrusionVerticalScale

A global multiplier that can be used to scale base, height, AO, and flood light of the fill extrusions. Default value: 1. Minimum value: 0.

fillExtrusionVerticalScaleTransition

Defines the transition of fillExtrusionVerticalScale. Default value: 1. Minimum value: 0.

visibility

Whether this layer is displayed. Default value: "visible".

minZoom

The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden. Value range: 0, 24

maxZoom

The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden. Value range: 0, 24

sourceLayer

Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.

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 ["feature-state", ...] expression is not supported in filter expressions. The ["pitch"] and ["distance-from-center"] expressions are supported only for filter expressions on the symbol layer.