Get markers from ClusterManager

I am using ClusterManager to group markers in android app.

I want to get a list of markers and use

mClusterManager.getMarkerCollection().getMarkers();

      

This method does not return markers when we zoom out. And returns markers only when scaled to show all markers. Is there a way to get all the markers?

+3


source to share


1 answer


Try the following:



java.util.Collection<Marker> userCollection = mClusterManager.getMarkerCollection().mMarkers;       
ArrayList<Marker> userList = new ArrayList<Marker>(userCollection);
Log.d("list", "size: " + userList.size());

      

+1


source







All Articles