has

open fun has(@NonNull key: Expression): Expression

Tests for the presence of an property value in the current feature's properties.

Example usage:


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

Return

expression

Parameters

key

the expression property value key

See also

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

open fun has(@NonNull key: String): Expression

Tests for the presence of an property value in the current feature's properties.

Example usage:


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

Return

expression

Parameters

key

the property value key

See also

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

open fun has(@NonNull key: Expression, @NonNull object: Expression): Expression

Tests for the presence of an property value from another object.

Example usage:


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

Return

expression

Parameters

key

the expression property value key

object

an expression object

See also

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

open fun has(@NonNull key: String, @NonNull object: Expression): Expression

Tests for the presence of an property value from another object.

Example usage:


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

Return

expression

Parameters

key

the property value key

object

an expression object

See also

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