We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi Mickael,
I have a problem with the number displayed on the cluster icon. I've customized RadiusMarkerClusterer that way to only cluster :
public class MyRadiusMarkerClusterer extends RadiusMarkerClusterer { public int getMinNumOfMarkersInCluster() { return minNumOfMarkersInCluster; } public void setMinNumOfMarkersInCluster(int minNumOfMarkersInCluster) { this.minNumOfMarkersInCluster = minNumOfMarkersInCluster; } int minNumOfMarkersInCluster = 1; // Initialized to 1 to keep the same behavior as today public MyRadiusMarkerClusterer(Context ctx) { super(ctx); } @Override public ArrayList<StaticCluster> clusterer(MapView mapView) { ArrayList<StaticCluster> clusters = super.clusterer(mapView); ArrayList<StaticCluster> myClusters = new ArrayList<>(); Iterator<StaticCluster> itClusters = clusters.iterator(); while(itClusters.hasNext()) { StaticCluster cluster = itClusters.next(); if (cluster.getSize() < minNumOfMarkersInCluster) { for (int i = 0; i < cluster.getSize(); i++) { StaticCluster newCluster = new StaticCluster(cluster.getItem(i).getPosition()); newCluster.add(cluster.getItem(i)); myClusters.add(newCluster); } } else { myClusters.add(cluster); } } clusters.clear(); // Not sure it's useful return myClusters; } @Override public boolean onSingleTapConfirmed(final MotionEvent event, final MapView mapView){ for (int i = mClusters.size() - 1; i >= 0 ; i--){ StaticCluster cluster = mClusters.get(i); if (cluster.getMarker().onSingleTapConfirmed(event, mapView)) return true; } return false; } }
So that way, the number of items supposed to be contained in a cluster is higher than expected. I think that some items are counted twice maybe.
What's your opinion?
The text was updated successfully, but these errors were encountered:
refers to #204
Sorry, something went wrong.
No branches or pull requests
Hi Mickael,
I have a problem with the number displayed on the cluster icon.
I've customized RadiusMarkerClusterer that way to only cluster :
So that way, the number of items supposed to be contained in a cluster is higher than expected.
I think that some items are counted twice maybe.
What's your opinion?
The text was updated successfully, but these errors were encountered: