@honua/sdk-js
    Preparing search index...

    Module expr

    @honua/sdk-js/expr — Honua expression builder.

    A small, typed DSL that compiles to the MapLibre-style style/filter expression shape. Use it to build runtime style expressions, layer filters, and Honua-side projections without hand-rolling JSON arrays.

    import { get, eq, all, gt, interpolate, linear, zoom, rgb } from "@honua/sdk-js/expr";

    // Filter: STATUS = 'ACTIVE' AND POPULATION > 10000
    const filter = all(eq(get("STATUS"), "ACTIVE"), gt(get("POPULATION"), 10000));

    // Paint expression: interpolate point color by zoom
    const color = interpolate(linear(), zoom(), 8, rgb(70, 130, 180), 14, rgb(220, 20, 60));
    import { expr, eq, get } from "@honua/sdk-js/expr";

    const isActive = eq(get("STATUS"), "ACTIVE");
    const json = expr(isActive); // ["==", ["get", "STATUS"], "ACTIVE"]
    map.setFilter("parcels", json);

    Functions

    abs
    accumulated
    acos
    add
    all
    any
    asin
    at
    atan
    ceil
    coalesce
    collator
    concat
    contains
    cos
    cubicBezier
    distance
    distanceFromCenter
    divide
    downcase
    e
    eq
    exponential
    exprToString
    featureState
    floor
    format
    geometryType
    get
    gt
    gte
    has
    heatmapDensity
    hsl
    hsla
    id
    image
    indexOf
    interpolate
    interpolateHcl
    interpolateLab
    intersects
    length
    letExpr
    linear
    lineProgress
    literal
    ln
    ln2Const
    log10
    log2
    lt
    lte
    matchExpr
    max
    min
    mod
    multiply
    neq
    not
    numberFormat
    pi
    pitch
    pow
    properties
    resolvedLocale
    rgb
    rgba
    round
    sin
    slice
    sqrt
    step
    subtract
    switchCase
    tan
    toBoolean
    toColor
    toNumber
    toRgba
    typeOf
    upcase
    varExpr
    within
    zoom

    References

    BooleanInput → BooleanInput
    CollatorOptions → CollatorOptions
    ColorInput → ColorInput
    expr → expr
    Expr → Expr
    ExprCollator → ExprCollator
    ExprColor → ExprColor
    ExprFormatted → ExprFormatted
    ExprImage → ExprImage
    ExprValue → ExprValue
    FormatSegmentOptions → FormatSegmentOptions
    GeoJsonGeometry → GeoJsonGeometry
    GeoJsonLineString → GeoJsonLineString
    GeoJsonMultiLineString → GeoJsonMultiLineString
    GeoJsonMultiPoint → GeoJsonMultiPoint
    GeoJsonMultiPolygon → GeoJsonMultiPolygon
    GeoJsonPoint → GeoJsonPoint
    GeoJsonPolygon → GeoJsonPolygon
    InterpolationMethod → InterpolationMethod
    NumberFormatOptions → NumberFormatOptions
    NumberInput → NumberInput
    Resolvable → Resolvable
    StringInput → StringInput