Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get Markers from ClusterManager

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 ?

like image 612
Sunny Avatar asked Nov 22 '25 18:11

Sunny


1 Answers

Try this:

java.util.Collection<Marker> userCollection = mClusterManager.getMarkerCollection().mMarkers;       
ArrayList<Marker> userList = new ArrayList<Marker>(userCollection);
Log.d("list", "size: " + userList.size());
like image 50
Efroz Ghauri Avatar answered Nov 25 '25 09:11

Efroz Ghauri