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

Cluster does not get removed #397

Closed
cwsiteplan opened this issue Sep 12, 2023 · 3 comments
Closed

Cluster does not get removed #397

cwsiteplan opened this issue Sep 12, 2023 · 3 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@cwsiteplan
Copy link

cwsiteplan commented Sep 12, 2023

I conditionally show clusters in the map.
It seems once a cluster is added it won't get removed.

    var showCluster by remember { mutableStateOf(false) }

GoogleMap(...) {
  if (showCluster) {
    Clustering(...)
  }
  // other clusters
  Clustering(...)
}

Adapted the sample to have multiple clusters that can be toggled on/off
https://gist.github.com/cwsiteplan/5e78d6068d81200421a8a74c161991a1#file-maps-compose-cluster-bug-kt

@cwsiteplan cwsiteplan added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Sep 12, 2023
@cobermayr
Copy link

I experienced the same problem.

@kikoso kikoso added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed triage me I really want to be triaged. labels Nov 13, 2023
@kikoso
Copy link
Collaborator

kikoso commented Nov 13, 2023

@cwsiteplan the following PR should fix this. The Clustering was not being disposed after a recomposition:

#458

@cwsiteplan
Copy link
Author

seems to work fine now - will close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants