Clustering should support diff util
Is your feature request related to a problem? Please describe. My map has millions of points so I cannot add all of them at once. Hence what map moves I download items only visible on screen. When user does only small map movements points and clusters flicker and animations looks bad. This is because current implementation look like this:
LaunchedEffect(itemsState) {
snapshotFlow { itemsState.value.toList() }
.collect { items ->
clusterManager.clearItems()
clusterManager.addItems(items)
clusterManager.cluster()
}
}
So when ever items are updated clustering is recreated.
Describe the solution you'd like I think we should be able to provide some diffing to only add or remove a subset of items.
Describe alternatives you've considered
I also though about just coping whole Clustering method and add custom logic, but it's not possible to reuse ResetMapListeners method.
If you would like to upvote the priority of this issue, please comment below or react on the original post above with :+1: so we can see what is popular when we triage.
@MikolajKakol Thank you for opening this issue. 🙏 Please check out these other resources that might help you get to a resolution in the meantime:
- Check the issue tracker - bugs and feature requests for Google Maps Platform APIs and SDKs
- Open a support case - Get 1:1 support in Cloud Console.
- Discord - chat with other developers
-
StackOverflow - use the
google-mapstag
This is an automated message, feel free to ignore.
Absolutely agree! 👍 This would be a valuable addition. Let's prioritize this!
Hi @MikolajKakol ,
Did you check the sample using the NonHierarchicalViewBasedAlgorithm? This only renders the screen content.
Hi @kikoso, it would be possible solution if I could populate map with all points from backend, but it is not possible to fetch all of them.