For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.

Type Alias ColorReliefLayerSpecification

type ColorReliefLayerSpecification = {
    filter?: FilterSpecification;
    id: string;
    layout?: { visibility?: VisibilitySpecification };
    maxzoom?: number;
    metadata?: unknown;
    minzoom?: number;
    paint?: {
        "color-relief-color"?: ExpressionSpecification;
        "color-relief-opacity"?: PropertyValueSpecification<number>;
        "color-relief-opacity-transition"?: TransitionSpecification;
        resampling?: PropertyValueSpecification<"linear" | "nearest">;
    };
    source: string;
    "source-layer"?: string;
    type: "color-relief";
}
Index

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-state expression is not supported in filter expressions.

id: string

Unique layer name.

layout?: { visibility?: VisibilitySpecification }

Layout properties for the layer.

Type Declaration

maxzoom?: number

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

metadata?: unknown

Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'maplibre:'.

{"source:comment": "Hydrology FCCODE 460 - Narrow wash"}
minzoom?: number

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

paint?: {
    "color-relief-color"?: ExpressionSpecification;
    "color-relief-opacity"?: PropertyValueSpecification<number>;
    "color-relief-opacity-transition"?: TransitionSpecification;
    resampling?: PropertyValueSpecification<"linear" | "nearest">;
}

Default paint properties for this layer.

Type Declaration

  • Optionalcolor-relief-color?: ExpressionSpecification

    Defines the color of each pixel based on its elevation. Should be an expression that uses ["elevation"] as input.

    [
        "interpolate",
        ["linear"],
        ["elevation"],
        0,
        "black",
        8849,
        "white"
    ]
    
  • Optionalcolor-relief-opacity?: PropertyValueSpecification<number>

    The opacity at which the color-relief will be drawn.

    1
    
  • Optionalcolor-relief-opacity-transition?: TransitionSpecification
  • Optionalresampling?: PropertyValueSpecification<"linear" | "nearest">

    The resampling/interpolation method to use for overscaling, also known as texture magnification filter. Visual comparison of linear resampling versus nearest resampling

    "linear"
    
source: string

Name of a source description to be used for this layer. Required for all layer types except background.

"source-layer"?: string

Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.

type: "color-relief"
Was this helpful?