On this page

Type Alias HillshadeLayerSpecification

type HillshadeLayerSpecification = {
    filter?: FilterSpecification;
    id: string;
    layout?: { visibility?: VisibilitySpecification };
    maxzoom?: number;
    metadata?: unknown;
    minzoom?: number;
    paint?: {
        "hillshade-accent-color"?: PropertyValueSpecification<
            ColorSpecification,
        >;
        "hillshade-accent-color-transition"?: TransitionSpecification;
        "hillshade-exaggeration"?: PropertyValueSpecification<number>;
        "hillshade-exaggeration-transition"?: TransitionSpecification;
        "hillshade-highlight-color"?: PropertyValueSpecification<
            ColorArraySpecification,
        >;
        "hillshade-highlight-color-transition"?: TransitionSpecification;
        "hillshade-illumination-altitude"?: PropertyValueSpecification<
            NumberArraySpecification,
        >;
        "hillshade-illumination-anchor"?: PropertyValueSpecification<
            "map"
            | "viewport",
        >;
        "hillshade-illumination-direction"?: PropertyValueSpecification<
            NumberArraySpecification,
        >;
        "hillshade-method"?: PropertyValueSpecification<
            "standard"
            | "basic"
            | "combined"
            | "igor"
            | "multidirectional",
        >;
        "hillshade-shadow-color"?: PropertyValueSpecification<
            ColorArraySpecification,
        >;
        "hillshade-shadow-color-transition"?: TransitionSpecification;
        resampling?: PropertyValueSpecification<"linear" | "nearest">;
    };
    source: string;
    "source-layer"?: string;
    type: "hillshade";
}
Index

Properties

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?: {
    "hillshade-accent-color"?: PropertyValueSpecification<
        ColorSpecification,
    >;
    "hillshade-accent-color-transition"?: TransitionSpecification;
    "hillshade-exaggeration"?: PropertyValueSpecification<number>;
    "hillshade-exaggeration-transition"?: TransitionSpecification;
    "hillshade-highlight-color"?: PropertyValueSpecification<
        ColorArraySpecification,
    >;
    "hillshade-highlight-color-transition"?: TransitionSpecification;
    "hillshade-illumination-altitude"?: PropertyValueSpecification<
        NumberArraySpecification,
    >;
    "hillshade-illumination-anchor"?: PropertyValueSpecification<
        "map"
        | "viewport",
    >;
    "hillshade-illumination-direction"?: PropertyValueSpecification<
        NumberArraySpecification,
    >;
    "hillshade-method"?: PropertyValueSpecification<
        "standard"
        | "basic"
        | "combined"
        | "igor"
        | "multidirectional",
    >;
    "hillshade-shadow-color"?: PropertyValueSpecification<
        ColorArraySpecification,
    >;
    "hillshade-shadow-color-transition"?: TransitionSpecification;
    resampling?: PropertyValueSpecification<"linear" | "nearest">;
}

Default paint properties for this layer.

Type Declaration

  • Optionalhillshade-accent-color?: PropertyValueSpecification<ColorSpecification>

    The shading color used to accentuate rugged terrain like sharp cliffs and gorges.

    "#000000"
    
  • Optionalhillshade-accent-color-transition?: TransitionSpecification
  • Optionalhillshade-exaggeration?: PropertyValueSpecification<number>

    Intensity of the hillshade

    0.5
    
  • Optionalhillshade-exaggeration-transition?: TransitionSpecification
  • Optionalhillshade-highlight-color?: PropertyValueSpecification<ColorArraySpecification>

    The shading color of areas that faces towards the light source(s). Only when hillshade-method is set to multidirectional can you specify multiple light sources.

    "#FFFFFF"
    
  • Optionalhillshade-highlight-color-transition?: TransitionSpecification
  • Optionalhillshade-illumination-altitude?: PropertyValueSpecification<NumberArraySpecification>

    The altitude of the light source(s) used to generate the hillshading with 0 as sunset and 90 as noon. Only when hillshade-method is set to multidirectional can you specify multiple light sources.

    45
    
  • Optionalhillshade-illumination-anchor?: PropertyValueSpecification<"map" | "viewport">

    Direction of light source when map is rotated.

    "viewport"
    
  • Optionalhillshade-illumination-direction?: PropertyValueSpecification<NumberArraySpecification>

    The direction of the light source(s) used to generate the hillshading with 0 as the top of the viewport if hillshade-illumination-anchor is set to viewport and due north if hillshade-illumination-anchor is set to map. Only when hillshade-method is set to multidirectional can you specify multiple light sources.

    335
    
  • Optionalhillshade-method?: PropertyValueSpecification<
        "standard"
        | "basic"
        | "combined"
        | "igor"
        | "multidirectional",
    >

    The hillshade algorithm to use, one of standard, basic, combined, igor, or multidirectional. Visual comparison of standard, basic, igor, combined, and multidirectional hillshade-method

    "standard"
    
  • Optionalhillshade-shadow-color?: PropertyValueSpecification<ColorArraySpecification>

    The shading color of areas that face away from the light source(s). Only when hillshade-method is set to multidirectional can you specify multiple light sources.

    "#000000"
    
  • Optionalhillshade-shadow-color-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: "hillshade"
Was this helpful?
SDK JS
Reference
HillshadeLayerSpecification