getRenderedFeatureCount

open fun getRenderedFeatureCount(@Nullable featureId: String, @Nullable layerId: String, @Nullable sourceId: String): Int(source)

If rendered feature info is enabled via MapLibreMapOptions, returns the number of features matching the specified filter criteria that were rendered in the last completed frame.

Return

The number of matching features

Parameters

featureId

Feature ID to match, or null for any feature

layerId

Layer ID to match, or null for any layer

sourceId

Source ID to match, or null for any source