Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clustering should support diff util #504

Open
MikolajKakol opened this issue Jan 9, 2024 · 4 comments
Open

Clustering should support diff util #504

MikolajKakol opened this issue Jan 9, 2024 · 4 comments
Labels
triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@MikolajKakol
Copy link

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.

@MikolajKakol MikolajKakol added triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Jan 9, 2024
@wangela
Copy link
Member

wangela commented Jan 9, 2024

If you would like to upvote the priority of this issue, please comment below or react on the original post above with 👍 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:

This is an automated message, feel free to ignore.

@PabloJuice
Copy link

Absolutely agree! 👍 This would be a valuable addition. Let's prioritize this!

@kikoso
Copy link
Collaborator

kikoso commented Jan 9, 2024

Hi @MikolajKakol ,

Did you check the sample using the NonHierarchicalViewBasedAlgorithm? This only renders the screen content.

@MikolajKakol
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants