Companion
Factory helpers mirroring Mapbox expression operators. Each method returns a new Expression node; nest them or wrap in StyleValue.Expression as needed.
Unless a factory says otherwise, GLES Feature-path evaluation does run the operator for fill/line/symbol/heatmap paint and for vector layer filters.
Properties
["geometry-type"]. Serializes for Mapbox native layers; GLES Feature-path evaluation does not resolve this operator.
Active map timeline position as Unix seconds (from the map controller), not wall clock. iOS/JS ["map-time"] parity. Used in vector filters; GLES applies it on the dedicated map-time reveal path rather than the generic paint evaluator.
Functions
["abs", value].
["+", lhs, rhs].
["all", …expressions] — logical AND.
["ceil", value].
["coalesce", …expressions] — first non-null result.
["concat", …parts] — string concatenation (also used to prefix # on hex colors).
["/", lhs, rhs].
["downcase", input].
["==", lhs, rhs].
["floor", value].
Mapbox ["format", text, options, …] for mixed-style labels. Serializes for Mapbox native symbol layers; GLES Feature-path evaluation does not run this operator.
Nested property access: "a.b" → ["get", "b", ["get", "a"]], and numeric segments such as "vals.0" become ["at", 0, ["get", "vals"]].
[">", lhs, rhs].
[">=", lhs, rhs].
Nested has: "a.b" → ["has", "b", ["get", "a"]].
["index-of", search, array]. Serializes for Mapbox native layers; GLES Feature-path evaluation does not run this operator.
Linear ["interpolate", ["linear"], input, …stops]. ColorStop entries expand to value + rgba(...) string. GLES evaluates linear interpolation for color and number paint.
["interpolate", interpolation, input, …stops].
["interpolate", ["cubic-bezier", x1, y1, x2, y2], input, …stops]. controlPoints must be four numbers. GLES evaluates cubic-bezier interpolation.
["interpolate", ["exponential", base], input, …stops]. GLES evaluates exponential interpolation for color and number paint.
["length", input] — string or array length.
["<", lhs, rhs].
["<=", lhs, rhs].
["literal", value] — wrap a Kotlin value as an expression operand.
["match", input, label, output, …, fallback]. Each Step.value is a match label and Step.result the output for that label.
["max", …values].
["min", …values].
["%", lhs, rhs] (remainder).
["*", lhs, rhs].
["!", expression] — logical NOT.
["!=", lhs, rhs].
["any", …expressions] — logical OR.
["round", value].
["step", input, output0, stop1, output1, …]. The first Step is the base output (its Step.value is ignored); later stops pair Step.value thresholds with outputs.
Unary negate: ["-", 0, value].
["-", lhs, rhs].
["case", cond1, out1, …, fallback] (Mapbox case; named switchCase to avoid the Kotlin keyword).
["to-boolean", value]. Serializes for Mapbox native layers. GLES Feature-path evaluation does not run this operator except a narrow symbol-color path.
["to-number", value].
["to-string", value].
["upcase", input].
["var", name] — reference a name bound by bind.