gt

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

Returns true if the first input is strictly greater than 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(
    gt(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/#%3E">Style specification</a>

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

Returns true if the first input is strictly greater than 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(
    gt(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/#%3E">Style specification</a>

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

Returns true if the first input is strictly greater than the second, false otherwise.

Example usage:


FillLayer fillLayer = new FillLayer("layer-id", "source-id");
fillLayer.setFilter(
    gt(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/#%3E">Style specification</a>

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

Returns true if the first input is strictly greater than the second, false otherwise.

Example usage:


FillLayer fillLayer = new FillLayer("layer-id", "source-id");
fillLayer.setFilter(
    gt(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/#%3E">Style specification</a>

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

Returns true if the first input is strictly greater than 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(
    gt(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/#%3E">Style specification</a>