literal

open fun literal(@NonNull number: Number): Expression

Create a literal number expression.

Example usage:


CircleLayer circleLayer = new CircleLayer("layer-id", "source-id");
circleLayer.setProperties(
    circleRadius(literal(10.0f))
);

Return

the expression

Parameters

number

the number


open fun literal(@NonNull string: String): Expression

Create a literal string expression.

Example usage:


SymbolLayer symbolLayer = new SymbolLayer("layer-id", "source-id");
symbolLayer.setProperties(
    textField(literal("Text"))
);

Return

the expression

Parameters

string

the string


open fun literal(bool: Boolean): Expression

Create a literal boolean expression.

Example usage:


FillLayer fillLayer = new FillLayer("layer-id", "source-id");
fillLayer.setProperties(
    fillAntialias(literal(true))
);

Return

the expression

Parameters

bool

the boolean


open fun literal(@NonNull object: Any): Expression

Create a literal object expression.

Return

the expression

Parameters

object

the object


open fun literal(@NonNull array: Array<Any>): Expression

Create a literal array expression

Return

the expression

Parameters

array

the array