abs

open fun abs(expression: Expression): Expression

Returns the absolute value of the input.

Example usage:


CircleLayer circleLayer = new CircleLayer("layer-id", "source-id");
circleLayer.setProperties(
    circleRadius(abs(subtract(pi())))
);

Return

expression

Parameters

expression

number expression to get absolute value from

See also

<a href="https://maplibre.org/maplibre-style-spec/expressions/#abs">Style specification</a>

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

Returns the absolute value of the input.

Example usage:


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

Return

expression

Parameters

number

number to get absolute value from

See also

<a href="https://maplibre.org/maplibre-style-spec/expressions/#abs">Style specification</a>