Expression

An expression defines a formula for computing the value of any layout property, paint property, or filter within a map style. Expressions allow you to style data with multiple feature properties at once, apply conditional logic, and manipulate data with mathematical, logical, and string operators. This allows for sophisticated runtime styling.

Types

Link copied to clipboard
abstract class Builder(operator: String)

Abstract base builder.

Link copied to clipboard

Builder for Collator expression.

Link copied to clipboard
object Companion

Static variables and methods.

Link copied to clipboard

Builder for Expression.

Link copied to clipboard

Builder for Formatted TextField.

Link copied to clipboard

Builder for a Formatted Section.

Link copied to clipboard

Builder for Image expression options

Link copied to clipboard

Builder for Interpolate Expression.

Link copied to clipboard

Builder for Number Format expression.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
inline fun <T> getLiteral(): T?

Get the literal value of the expression as given type.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Check if the expression is literal.

Link copied to clipboard
open fun toJson(): String
Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
Link copied to clipboard
var literalValue: Any? = null

Return Expression as literal Value.

Extensions

Link copied to clipboard

Extension function for Value to unwrap Value to Any.

Link copied to clipboard

Extension function for Value to unwrap Value to Expression.

Link copied to clipboard

Extension function for Value to unwrap Value to StyleTransition.

Link copied to clipboard
inline fun <T> Value.unwrapToTyped(): T

Extension function for Value to unwrap Value to the given type.