Type Alias RasterLayerSpecification
filter?: FilterSpecification;
id: string;
layout?: { visibility?: VisibilitySpecification };
maxzoom?: number;
metadata?: unknown;
minzoom?: number;
paint?: {
"raster-brightness-max"?: PropertyValueSpecification<number>;
"raster-brightness-max-transition"?: TransitionSpecification;
"raster-brightness-min"?: PropertyValueSpecification<number>;
"raster-brightness-min-transition"?: TransitionSpecification;
"raster-contrast"?: PropertyValueSpecification<number>;
"raster-contrast-transition"?: TransitionSpecification;
"raster-fade-duration"?: PropertyValueSpecification<number>;
"raster-hue-rotate"?: PropertyValueSpecification<number>;
"raster-hue-rotate-transition"?: TransitionSpecification;
"raster-opacity"?: PropertyValueSpecification<number>;
"raster-opacity-transition"?: TransitionSpecification;
"raster-resampling"?: PropertyValueSpecification<"linear" | "nearest">;
"raster-saturation"?: PropertyValueSpecification<number>;
"raster-saturation-transition"?: TransitionSpecification;
resampling?: PropertyValueSpecification<"linear" | "nearest">;
};
source: string;
"source-layer"?: string;
type: "raster";
}
Properties
Optionalfilter
id
Unique layer name.
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
"raster-brightness-max"?: PropertyValueSpecification<number>;
"raster-brightness-max-transition"?: TransitionSpecification;
"raster-brightness-min"?: PropertyValueSpecification<number>;
"raster-brightness-min-transition"?: TransitionSpecification;
"raster-contrast"?: PropertyValueSpecification<number>;
"raster-contrast-transition"?: TransitionSpecification;
"raster-fade-duration"?: PropertyValueSpecification<number>;
"raster-hue-rotate"?: PropertyValueSpecification<number>;
"raster-hue-rotate-transition"?: TransitionSpecification;
"raster-opacity"?: PropertyValueSpecification<number>;
"raster-opacity-transition"?: TransitionSpecification;
"raster-resampling"?: PropertyValueSpecification<"linear" | "nearest">;
"raster-saturation"?: PropertyValueSpecification<number>;
"raster-saturation-transition"?: TransitionSpecification;
resampling?: PropertyValueSpecification<"linear" | "nearest">;
}
Default paint properties for this layer.
Type Declaration
Optionalraster-brightness-max?: PropertyValueSpecification<number>Increase or reduce the brightness of the image. The value is the maximum brightness.
Optionalraster-brightness-max-transition?: TransitionSpecificationOptionalraster-brightness-min?: PropertyValueSpecification<number>Increase or reduce the brightness of the image. The value is the minimum brightness.
Optionalraster-brightness-min-transition?: TransitionSpecificationOptionalraster-contrast?: PropertyValueSpecification<number>Increase or reduce the contrast of the image.
Optionalraster-contrast-transition?: TransitionSpecificationOptionalraster-fade-duration?: PropertyValueSpecification<number>Fade duration when a new tile is added, or when a video is started or its coordinates are updated.
Optionalraster-hue-rotate?: PropertyValueSpecification<number>Rotates hues around the color wheel.
Optionalraster-hue-rotate-transition?: TransitionSpecificationOptionalraster-opacity?: PropertyValueSpecification<number>The opacity at which the image will be drawn.
Optionalraster-opacity-transition?: TransitionSpecificationOptionalraster-resampling?: PropertyValueSpecification<"linear" | "nearest">The resampling/interpolation method to use for overscaling, also known as texture magnification filter. It is advised to use the generic
resamplingpaint property instead.Optionalraster-saturation?: PropertyValueSpecification<number>Increase or reduce the saturation of the image.
Optionalraster-saturation-transition?: TransitionSpecificationOptionalresampling?: PropertyValueSpecification<"linear" | "nearest">The resampling/interpolation method to use for overscaling, also known as texture magnification filter.

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.