Feature

object Feature(source)

Object to access feature-related data, see feature

Functions

Link copied to clipboard

Gets the value of a cluster property accumulated so far. Can only be used in the clusterProperties option of a clustered GeoJSON source, see dev.sargunv.maplibrecompose.core.source.GeoJsonOptions.

Link copied to clipboard

Returns the shortest distance in meters between the evaluated feature and geometry.

Link copied to clipboard

Gets the feature's geometry type.

Link copied to clipboard
operator fun get(key: Expression<StringValue>): Expression<*>
operator fun get(key: String): Expression<*>

Returns the value corresponding to the given key in the current feature's properties or null if it is not present.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

Gets the progress along a gradient line. Can only be used in the gradient property of a line layer, see dev.sargunv.maplibrecompose.compose.layer.LineLayer.

Link copied to clipboard

Gets the feature properties object. Note that in some cases, it may be more efficient to use get("property_name") directly.

Link copied to clipboard

Note: Not supported on native platforms. See maplibre-native#1698

Link copied to clipboard

Returns true if the evaluated feature is fully contained inside a boundary of the input geometry, false otherwise. The input value can be a valid GeoJSON of type Polygon, MultiPolygon, Feature, or FeatureCollection. Supported features for evaluation: