Expression

data class Expression(val raw: Any)

Mapbox style expression wrapper: holds a JSON-serializable tree (usually a List with an operator in the first element, or a nested structure) compatible with Mapbox’s expression spec.

Use the factory methods on the companion object for common operators (get, interpolate, match, …). Embed inside StyleValue.Expression for data-driven paint properties.

See also

Constructors

Link copied to clipboard
constructor(raw: Any)

Types

Link copied to clipboard
data class Case(val condition: Expression, val result: Any?)

One branch in a case expression: boolean condition and result when true.

Link copied to clipboard
object Companion

Factory helpers mirroring Mapbox expression operators. Methods return new Expression nodes; combine them or wrap in StyleValue.Expression as needed.

Link copied to clipboard
data class Step<T>(val value: T?, val result: Any)

One stop in step (or similar) expressions: input threshold value and result output.

Link copied to clipboard
data class Variable(val key: String, val value: Any)

Binding for let: key name and value bound expression or literal.

Properties

Link copied to clipboard
val raw: Any

Underlying value passed to makeJSONObject for style JSON or debugging.

Functions

Link copied to clipboard