Get Markers from ClusterManager

5.2k Views Asked by At

I am using ClusterManager to group the markers in android application.

I want to get list of markers and use

mClusterManager.getMarkerCollection().getMarkers();

This method returns no markers when we zoom out.and returns markers only when zoom in to show all markers.is there any way to get all markers ?

1

There are 1 best solutions below

0
On

Try this:

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