Late last year, Mapbox implemented clusterProperties attribute for ShapeSource, which enables declaring custom aggregated properties for clustered features on the map.
Android: https://github.com/mapbox/mapbox-gl-native/pull/15425
iOS: https://github.com/mapbox/mapbox-gl-native/pull/15515
I would very much like to see this implemented, as we have a use case in our app where we want to open a new view on cluster tap, which shows information for all features clustered under the icon. Additionally, we want to show information on the icon which is more complex than simple {point_count}.
I have started implementing it myself, and got it working on Android – but due to the outstanding use_frameworks! issue on iOS (https://github.com/mapbox/mapbox-gl-native-ios/issues/154), I haven't been able to fully test this.
If anyone wants to take over the branch from https://github.com/ivari/maps/tree/implement-clustering-properties, you're welcome to do so – otherwise I'll come back to this at some future point and try to get a PR up.
@ivari thanks it looks great, we'd need an example. BTW for use_frameworks! we now have a workaround: https://github.com/react-native-mapbox-gl/maps/pull/714
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Would love to see this implemented.