Skip to content

Clustering should support diff util #504

Description

@MikolajKakol

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions