sharewire / google-maps-clustering

Fast marker clustering library for Google Maps Android API.
Apache License 2.0
292 stars 77 forks source link

Clearing clusters and items in OnResume #16

Open Therefore opened 6 years ago

Therefore commented 6 years ago

Hey it's me again.

I noticed that when I pause my application and come back in all of the items and clusters are still shown. I noticed that there isn't a clustermanager.clear() or similar. what would you recommend on how to deal with that? Thanks.

makovkastar commented 6 years ago

Hi. What's the problem with "when I pause my application and come back in all of the items and clusters are still shown"? Why do you think clusters should disappear when your app is resumed?

PJHaynes304 commented 6 years ago

Not sure what you're trying to achieve here as I'd agree with @makovkastar this would be expected behaviour BUT I clear the clusters by defining an empty list and calling mClusterManager.setItems(emtptyList); whenever I want to remove all the clusters.