GeoLeaf Core API - v3.0.0
    Preparing search index...
    • Converts GeoLeaf styleRules + defaultStyle to MapLibre data-driven paint expressions.

      For each paint property that varies across rules, builds a ["case", cond1, val1, cond2, val2, ..., defaultVal] expression.

      If defaultStyle.expressionPaint is set, those native MapLibre paint properties are injected last, overriding any GeoLeaf-derived or case-expression values for the same keys.

      Parameters

      • styleRules: GeoJSONStyleRule[]

        Array of { when, style } rules from the profile

      • defaultStyle: FlatStyle

        Default style (flat) applied when no rule matches

      • geometryType: "circle" | "line" | "fill" | "fill-extrusion"

        Target geometry type ('fill' | 'line' | 'circle' | 'fill-extrusion')

      • OptionallayerId: string

        Layer the paint is built for; used to resolve per-layer style overrides. Omitted, only the profile-level defaults apply.

      Returns Record<string, unknown>

      Paint object with expression values where needed