id

open fun id(): Expression

Gets the feature's id, if it has one.

Example usage:


SymbolLayer symbolLayer = new SymbolLayer("layer-id", "source-id");
symbolLayer.setProperties(
    textField(id())
);

Return

expression

See also

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