Type Alias FillLayerSpecification
filter?: FilterSpecification;
id: string;
layout?: {
"fill-sort-key"?: DataDrivenPropertyValueSpecification<number>;
visibility?: VisibilitySpecification;
};
maxzoom?: number;
metadata?: unknown;
minzoom?: number;
paint?: {
"fill-antialias"?: PropertyValueSpecification<boolean>;
"fill-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
"fill-color-transition"?: TransitionSpecification;
"fill-layer-opacity"?: PropertyValueSpecification<number>;
"fill-layer-opacity-transition"?: TransitionSpecification;
"fill-opacity"?: DataDrivenPropertyValueSpecification<number>;
"fill-opacity-transition"?: TransitionSpecification;
"fill-outline-color"?: DataDrivenPropertyValueSpecification<
ColorSpecification,
>;
"fill-outline-color-transition"?: TransitionSpecification;
"fill-pattern"?: DataDrivenPropertyValueSpecification<
ResolvedImageSpecification,
>;
"fill-pattern-transition"?: TransitionSpecification;
"fill-translate"?: PropertyValueSpecification<[number, number]>;
"fill-translate-anchor"?: PropertyValueSpecification<"map" | "viewport">;
"fill-translate-transition"?: TransitionSpecification;
};
source: string;
"source-layer"?: string;
type: "fill";
}
Properties
Optionalfilter
id
Unique layer name.
Optionallayout
"fill-sort-key"?: DataDrivenPropertyValueSpecification<number>;
visibility?: VisibilitySpecification;
}
Layout properties for the layer.
Type Declaration
Optionalfill-sort-key?: DataDrivenPropertyValueSpecification<number>Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
Optionalvisibility?: VisibilitySpecificationWhether this layer is displayed.
Optionalmaxzoom
The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.
Optionalmetadata
Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'maplibre:'.
Optionalminzoom
The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.
Optionalpaint
"fill-antialias"?: PropertyValueSpecification<boolean>;
"fill-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
"fill-color-transition"?: TransitionSpecification;
"fill-layer-opacity"?: PropertyValueSpecification<number>;
"fill-layer-opacity-transition"?: TransitionSpecification;
"fill-opacity"?: DataDrivenPropertyValueSpecification<number>;
"fill-opacity-transition"?: TransitionSpecification;
"fill-outline-color"?: DataDrivenPropertyValueSpecification<
ColorSpecification,
>;
"fill-outline-color-transition"?: TransitionSpecification;
"fill-pattern"?: DataDrivenPropertyValueSpecification<
ResolvedImageSpecification,
>;
"fill-pattern-transition"?: TransitionSpecification;
"fill-translate"?: PropertyValueSpecification<[number, number]>;
"fill-translate-anchor"?: PropertyValueSpecification<"map" | "viewport">;
"fill-translate-transition"?: TransitionSpecification;
}
Default paint properties for this layer.
Type Declaration
Optionalfill-antialias?: PropertyValueSpecification<boolean>Whether or not the fill should be antialiased.
Optionalfill-color?: DataDrivenPropertyValueSpecification<ColorSpecification>The color of the filled part of this layer. This color can be specified as
rgbawith an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used. When used with an SDF fill pattern, this serves as the foreground color of the pattern.Optionalfill-color-transition?: TransitionSpecificationOptionalfill-layer-opacity?: PropertyValueSpecification<number>Opacity applied to the layer as a whole. Unlike
fill-opacityand alpha values infill-color, which are applied per feature and accumulate where fills overlap,fill-layer-opacityis applied once so overlapping fills appear as a single surface at the given opacity. When bothfill-opacityandfill-layer-opacityare set, the per-feature, overlap accumulation is preserved, thenfill-layer-opacitycomposites the result. This property affects only the layer it is set on and cannot be used to composite multiple layers together or control how this layer blends with layers above or below it.Optionalfill-layer-opacity-transition?: TransitionSpecificationOptionalfill-opacity?: DataDrivenPropertyValueSpecification<number>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.Optionalfill-opacity-transition?: TransitionSpecificationOptionalfill-outline-color?: DataDrivenPropertyValueSpecification<ColorSpecification>The outline color of the fill. Matches the value of
fill-colorif unspecified.Optionalfill-outline-color-transition?: TransitionSpecificationOptionalfill-pattern?: DataDrivenPropertyValueSpecification<ResolvedImageSpecification>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.
Optionalfill-pattern-transition?: TransitionSpecificationOptionalfill-translate?: PropertyValueSpecification<[number, number]>The geometry's offset. Values are
[x, y]where negatives indicate left and up, respectively.Optionalfill-translate-anchor?: PropertyValueSpecification<"map" | "viewport">Controls the frame of reference for
fill-translate.Optionalfill-translate-transition?: TransitionSpecification
source
Name of a source description to be used for this layer. Required for all layer types except background.
Optionalsource-layer
Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.
A 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-stateexpression is not supported in filter expressions.