eq

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

Returns true if the input values are equal, false otherwise. The inputs must be numbers, strings, or booleans, and both of the same type.

Example usage:


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

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

Returns true if the input values are equal, false otherwise. The inputs must be numbers, strings, or booleans, and both of the same type.

Example usage:


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

open fun eq(@NonNull compareOne: Expression, compareTwo: Boolean): Expression

Returns true if the input values are equal, false otherwise.

Example usage:


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

Return

expression

Parameters

compareOne

the first expression

compareTwo

the second boolean

See also

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

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

Returns true if the input values are equal, false otherwise.

Example usage:


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

Return

expression

Parameters

compareOne

the first expression

compareTwo

the second number

See also

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

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

Returns true if the input values are equal, false otherwise. The inputs must be numbers, strings, or booleans, and both of the same type.

Example usage:


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

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

Returns true if the input values are equal, false otherwise.

Example usage:


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