Constant

data class Constant<T>(val value: T) : StyleValue<T>

A single literal value written directly into style JSON (not wrapped in an expression operator).

Constructors

Link copied to clipboard
constructor(value: T)

Properties

Link copied to clipboard

The Constant.value when this is a Constant; otherwise null.

Link copied to clipboard
Link copied to clipboard

JSON-ready representation: constants pass through makeJSONObject, expressions through com.xweather.mapsgl.style.Expression.toJSONObject. Useful for debugging or custom style serialization.

Link copied to clipboard
val value: T

The Kotlin value; converted for JSON via resolvedValue / makeJSONObject (colors to rgba(...), LineJoin/LineCap to strings, etc.).