I am using Google Maps V2 for Android together with maps utils extension library for marker clustering. Some parts of app does not need to get clustered markers.
Is there any way to forbid clusterManager to cluster markers and after certain conditions let it cluster items again?
I found myself another solution. I figured out that on
DefaultClusterRenderer
methodshouldRenderAsCluster
is responsible for whether the marker will be rendered as cluster or not. So I created a CustomRenderer class which extendsDefaultClusterRenderer
and created a method with a boolean variable to determine whether renderer should cluster or not.I also override the method here that i mentioned before.
And now if I want to stop clustering i just call this method from the activity i want.