FillLayer

fun FillLayer(sourceState: SourceState, layerId: String = remember { generateRandomLayerId("fill") }, fillSortKey: FillSortKey = FillSortKey.default, fillAntialias: FillAntialias = FillAntialias.default, fillColor: FillColor = FillColor.default, fillColorTransition: Transition = Transition.default, fillEmissiveStrength: FillEmissiveStrength = FillEmissiveStrength.default, fillEmissiveStrengthTransition: Transition = Transition.default, fillOpacity: FillOpacity = FillOpacity.default, fillOpacityTransition: Transition = Transition.default, fillOutlineColor: FillOutlineColor = FillOutlineColor.default, fillOutlineColorTransition: Transition = Transition.default, fillPattern: FillPattern = FillPattern.default, fillTranslate: FillTranslate = FillTranslate.default, fillTranslateTransition: Transition = Transition.default, fillTranslateAnchor: FillTranslateAnchor = FillTranslateAnchor.default, visibility: Visibility = Visibility.default, minZoom: MinZoom = MinZoom.default, maxZoom: MaxZoom = MaxZoom.default, sourceLayer: SourceLayer = SourceLayer.default, filter: Filter = Filter.default)

A filled polygon with an optional stroked border.

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.

fillSortKey

Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.

fillAntialias

Whether or not the fill should be antialiased.

fillColor

The color of the filled part of this layer. This color can be specified as rgba with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.

fillEmissiveStrength

Controls the intensity of light emitted on the source features.

fillOpacity

The opacity of the entire fill layer. In contrast to the fill-color, this value will also affect the 1px stroke around the fill, if the stroke is used.

fillOutlineColor

The outline color of the fill. Matches the value of fill-color if unspecified.

fillPattern

Name of image in sprite to use for drawing image 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.

fillTranslate

The geometry's offset. Values are x, y where negatives indicate left and up, respectively.

fillTranslateAnchor

Controls the frame of reference for fill-translate.

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.