Type Alias BackgroundLayerSpecification
id: string;
layout?: { visibility?: VisibilitySpecification };
maxzoom?: number;
metadata?: unknown;
minzoom?: number;
paint?: {
"background-color"?: PropertyValueSpecification<ColorSpecification>;
"background-color-transition"?: TransitionSpecification;
"background-opacity"?: PropertyValueSpecification<number>;
"background-opacity-transition"?: TransitionSpecification;
"background-pattern"?: PropertyValueSpecification<
ResolvedImageSpecification,
>;
"background-pattern-transition"?: TransitionSpecification;
};
type: "background";
}
Properties
id
Optionallayout
Layout properties for the layer.
Type Declaration
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
"background-color"?: PropertyValueSpecification<ColorSpecification>;
"background-color-transition"?: TransitionSpecification;
"background-opacity"?: PropertyValueSpecification<number>;
"background-opacity-transition"?: TransitionSpecification;
"background-pattern"?: PropertyValueSpecification<
ResolvedImageSpecification,
>;
"background-pattern-transition"?: TransitionSpecification;
}
Default paint properties for this layer.
Type Declaration
Optionalbackground-color?: PropertyValueSpecification<ColorSpecification>The color with which the background will be drawn.
Optionalbackground-color-transition?: TransitionSpecificationOptionalbackground-opacity?: PropertyValueSpecification<number>The opacity at which the background will be drawn.
Optionalbackground-opacity-transition?: TransitionSpecificationOptionalbackground-pattern?: PropertyValueSpecification<ResolvedImageSpecification>Name of image in sprite to use for drawing an image background. 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.
Optionalbackground-pattern-transition?: TransitionSpecification
Unique layer name.