lte

open fun lte(@NonNull compareOne: Expression, @NonNull compareTwo: Expression): Expression

Returns true if the first input is less than or equal to the second, false otherwise. The inputs must be numbers or strings, and both of the same type.

Example usage:


FillLayer fillLayer = new FillLayer("layer-id", "source-id");
fillLayer.setFilter(
    lte(get("keyToValue"), get("keyToOtherValue"))
);

Return

expression

Parameters

compareOne

the first expression

compareTwo

the second expression

See also

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

open fun lte(@NonNull compareOne: Expression, @NonNull compareTwo: Expression, @NonNull collator: Expression): Expression

Returns true if the first input is less than or equal to the second, false otherwise. The inputs must be numbers or strings, and both of the same type.

Example usage:


FillLayer fillLayer = new FillLayer("layer-id", "source-id");
fillLayer.setFilter(
    lte(get("keyToValue"), get("keyToOtherValue"), collator(true, false))
);

Return

expression

Parameters

compareOne

the first expression

compareTwo

the second expression

collator

the collator expression

See also

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

open fun lte(@NonNull compareOne: Expression, @NonNull compareTwo: Number): Expression

Returns true if the first input is less than or equal to the second, false otherwise.

Example usage:


FillLayer fillLayer = new FillLayer("layer-id", "source-id");
fillLayer.setFilter(
    lte(get("keyToValue"), 2.0f)
);

Return

expression

Parameters

compareOne

the first expression

compareTwo

the second number

See also

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

open fun lte(@NonNull compareOne: Expression, @NonNull compareTwo: String): Expression

Returns true if the first input is less than or equal to the second, false otherwise.

Example usage:


FillLayer fillLayer = new FillLayer("layer-id", "source-id");
fillLayer.setFilter(
    lte(get("keyToValue"), "value")
);

Return

expression

Parameters

compareOne

the first expression

compareTwo

the second string

See also

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

open fun lte(@NonNull compareOne: Expression, @NonNull compareTwo: String, @NonNull collator: Expression): Expression

Returns true if the first input is less than or equal to the second, false otherwise. The inputs must be numbers or strings, and both of the same type.

Example usage:


FillLayer fillLayer = new FillLayer("layer-id", "source-id");
fillLayer.setFilter(
    lte(get("keyToValue"), get("keyToOtherValue"), collator(true, false))
);

Return

expression

Parameters

compareOne

the first expression

compareTwo

the second String

collator

the collator expression

See also

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