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

    GeoJSON layer style (flat format)

    interface GeoJSONStyle {
        fillColor?: string;
        fillOpacity?: number;
        color?: string;
        weight?: number;
        opacity?: number;
        dashArray?: string;
        lineCap?: string;
        lineJoin?: string;
        radius?: number;
        shape?: string;
        hatch?: { enabled?: boolean; renderMode?: string; [key: string]: unknown };
        expressionPaint?: Record<string, unknown>;
        extends?: "base";
        [key: string]: unknown;
    }

    Indexable

    • [key: string]: unknown
    Index

    Properties

    fillColor?: string

    Fill color (hex/CSS).

    fillOpacity?: number

    Fill opacity (0–1).

    color?: string

    Stroke / line color (hex/CSS).

    weight?: number

    Stroke width in pixels.

    opacity?: number

    Stroke opacity (0–1).

    dashArray?: string

    Dash pattern, e.g. "5 10".

    lineCap?: string
    lineJoin?: string
    radius?: number

    Point radius in pixels.

    shape?: string

    Point shape ("circle", "square", …).

    hatch?: { enabled?: boolean; renderMode?: string; [key: string]: unknown }
    expressionPaint?: Record<string, unknown>

    Native MapLibre GL paint properties passed through as-is. Keys must be MapLibre paint property names (e.g. "fill-color", "line-width"). Values can be scalars or MapLibre GL expression arrays. These override any GeoLeaf-derived paint properties for the same key.

    { "expressionPaint": { "fill-color": ["interpolate", ["linear"], ["zoom"], 5, "#ffffcc", 12, "#800026"] } }
    
    extends?: "base"

    Inherit all unspecified properties from the file's root style object (the default style). Only "base" is supported. When set, only the properties that differ from the base need to be declared in this rule's style object.

    { "when": { "field": "class_id", "operator": "==", "value": 2 },
    "style": { "extends": "base", "hatch": { "spacingPx": 14 } } }