FillExtrusionLayer

fun FillExtrusionLayer(sourceState: SourceState, layerId: String = remember { generateRandomLayerId("fill-extrusion") }, fillExtrusionEdgeRadius: FillExtrusionEdgeRadius = FillExtrusionEdgeRadius.default, fillExtrusionAmbientOcclusionGroundAttenuation: FillExtrusionAmbientOcclusionGroundAttenuation = FillExtrusionAmbientOcclusionGroundAttenuation.default, fillExtrusionAmbientOcclusionGroundAttenuationTransition: Transition = Transition.default, fillExtrusionAmbientOcclusionGroundRadius: FillExtrusionAmbientOcclusionGroundRadius = FillExtrusionAmbientOcclusionGroundRadius.default, fillExtrusionAmbientOcclusionGroundRadiusTransition: Transition = Transition.default, fillExtrusionAmbientOcclusionIntensity: FillExtrusionAmbientOcclusionIntensity = FillExtrusionAmbientOcclusionIntensity.default, fillExtrusionAmbientOcclusionIntensityTransition: Transition = Transition.default, fillExtrusionAmbientOcclusionRadius: FillExtrusionAmbientOcclusionRadius = FillExtrusionAmbientOcclusionRadius.default, fillExtrusionAmbientOcclusionRadiusTransition: Transition = Transition.default, fillExtrusionAmbientOcclusionWallRadius: FillExtrusionAmbientOcclusionWallRadius = FillExtrusionAmbientOcclusionWallRadius.default, fillExtrusionAmbientOcclusionWallRadiusTransition: Transition = Transition.default, fillExtrusionBase: FillExtrusionBase = FillExtrusionBase.default, fillExtrusionBaseTransition: Transition = Transition.default, fillExtrusionColor: FillExtrusionColor = FillExtrusionColor.default, fillExtrusionColorTransition: Transition = Transition.default, fillExtrusionCutoffFadeRange: FillExtrusionCutoffFadeRange = FillExtrusionCutoffFadeRange.default, fillExtrusionEmissiveStrength: FillExtrusionEmissiveStrength = FillExtrusionEmissiveStrength.default, fillExtrusionEmissiveStrengthTransition: Transition = Transition.default, fillExtrusionFloodLightColor: FillExtrusionFloodLightColor = FillExtrusionFloodLightColor.default, fillExtrusionFloodLightColorTransition: Transition = Transition.default, fillExtrusionFloodLightGroundAttenuation: FillExtrusionFloodLightGroundAttenuation = FillExtrusionFloodLightGroundAttenuation.default, fillExtrusionFloodLightGroundAttenuationTransition: Transition = Transition.default, fillExtrusionFloodLightGroundRadius: FillExtrusionFloodLightGroundRadius = FillExtrusionFloodLightGroundRadius.default, fillExtrusionFloodLightGroundRadiusTransition: Transition = Transition.default, fillExtrusionFloodLightIntensity: FillExtrusionFloodLightIntensity = FillExtrusionFloodLightIntensity.default, fillExtrusionFloodLightIntensityTransition: Transition = Transition.default, fillExtrusionFloodLightWallRadius: FillExtrusionFloodLightWallRadius = FillExtrusionFloodLightWallRadius.default, fillExtrusionFloodLightWallRadiusTransition: Transition = Transition.default, fillExtrusionHeight: FillExtrusionHeight = FillExtrusionHeight.default, fillExtrusionHeightTransition: Transition = Transition.default, fillExtrusionOpacity: FillExtrusionOpacity = FillExtrusionOpacity.default, fillExtrusionOpacityTransition: Transition = Transition.default, fillExtrusionPattern: FillExtrusionPattern = FillExtrusionPattern.default, fillExtrusionRoundedRoof: FillExtrusionRoundedRoof = FillExtrusionRoundedRoof.default, fillExtrusionTranslate: FillExtrusionTranslate = FillExtrusionTranslate.default, fillExtrusionTranslateTransition: Transition = Transition.default, fillExtrusionTranslateAnchor: FillExtrusionTranslateAnchor = FillExtrusionTranslateAnchor.default, fillExtrusionVerticalGradient: FillExtrusionVerticalGradient = FillExtrusionVerticalGradient.default, fillExtrusionVerticalScale: FillExtrusionVerticalScale = FillExtrusionVerticalScale.default, fillExtrusionVerticalScaleTransition: Transition = Transition.default, visibility: Visibility = Visibility.default, minZoom: MinZoom = MinZoom.default, maxZoom: MaxZoom = MaxZoom.default, sourceLayer: SourceLayer = SourceLayer.default, filter: Filter = Filter.default)

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.

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.

fillExtrusionAmbientOcclusionGroundRadius

The extent of the ambient occlusion effect on the ground beneath the extruded buildings in meters.

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.

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.

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.

fillExtrusionBase

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

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.

fillExtrusionCutoffFadeRange

This parameter defines the range for the fade-out effect before an automatic content cutoff on pitched map views. The automatic cutoff range is calculated according to the minimum required zoom level of the source and layer. 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.

fillExtrusionEmissiveStrength

Controls the intensity of light emitted on the source features.

fillExtrusionFloodLightColor

The color of the flood light effect on the walls of the extruded buildings.

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.

fillExtrusionFloodLightGroundRadius

The extent of the flood light effect on the ground beneath the extruded buildings in meters.

fillExtrusionFloodLightIntensity

The intensity of the flood light color.

fillExtrusionFloodLightWallRadius

The extent of the flood light effect on the walls of the extruded buildings in meters.

fillExtrusionHeight

The height with which to extrude this layer.

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.

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.

fillExtrusionTranslate

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

fillExtrusionTranslateAnchor

Controls the frame of reference for fill-extrusion-translate.

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.

fillExtrusionVerticalScale

A global multiplier that can be used to scale base, height, AO, and flood light of the fill extrusions.

visibility

Whether this layer is displayed.

minZoom

The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.

maxZoom

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

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.