subtract

open fun subtract(@NonNull number: Expression): Expression

Returns the result of subtracting a number from 0.

Example usage:


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

Return

expression

Parameters

number

the number subtract from 0

See also

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

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

Returns the result of subtracting a number from 0.

Example usage:


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

Return

expression

Parameters

number

the number subtract from 0

See also

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

open fun subtract(@NonNull first: Expression, @NonNull second: Expression): Expression

Returns the result of subtracting the second input from the first.

Example usage:


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

Return

expression

Parameters

first

the first number

second

the second number

See also

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

open fun subtract(@NonNull first: Number, @NonNull second: Number): Expression

Returns the result of subtracting the second input from the first.

Example usage:


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

Return

expression

Parameters

first

the first number

second

the second number

See also

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