GeoLeaf Core API - v3.0.0
    Preparing search index...

    Parameters of a hatch fill pattern, rendered to an image and registered with the map.

    Hatching is not a MapLibre paint property: the pattern is drawn to a canvas and added as an image, which is why a hatched layer needs the map's style to be loaded before it can paint.

    interface HatchConfig {
        enabled?: boolean;
        type?: "x" | "diagonal" | "dot" | "cross" | "horizontal" | "vertical";
        angleDeg?: number;
        spacingPx?: number;
        stroke?: { color?: string; widthPx?: number; opacity?: number };
        renderMode?: string;
    }
    Index

    Properties

    enabled?: boolean

    Whether hatch is enabled.

    type?: "x" | "diagonal" | "dot" | "cross" | "horizontal" | "vertical"

    Hatch type.

    "diagonal"
    
    angleDeg?: number

    Rotation angle in degrees (for diagonal).

    45
    
    spacingPx?: number

    Spacing between pattern elements in pixels.

    10
    
    stroke?: { color?: string; widthPx?: number; opacity?: number }

    Stroke styling for the hatch lines/dots.

    renderMode?: string

    Fill render mode. "pattern_only" = no base fill, pattern only.