Is anyone else having this issue? It's not hitting the breakpoint nor showing the log.
mClusterManager.setOnClusterClickListener(new ClusterManager.OnClusterClickListener<Content>() {
@Override
public boolean onClusterClick(Cluster<Content> cluster) {
AppLog.d("CLUSTER_CLICKED", "cluster is clicked);");
return false;
}
});
I'm not sure if it helps, but I'm using a custom cluster adapter:
mapsMarkerManager.getClusterManager().getClusterMarkerCollection().setOnInfoWindowAdapter(new ClusterInfoWindowAdapter(getActivity(), mapsMarkerManager));
I'm using:
compile 'com.google.maps.android:android-maps-utils:0.3.1'
Oh, snap. Now it's working. Sorry about that. I didn't add this line:
googleMap.setOnMarkerClickListener(mClusterManager);
Apparently it's needed.
This information took too long to find. Perhaps sample app could include an example?
To get click events one must:
Example:
mClusterManager.setOnClusterInfoWindowClickListener(...)
mClusterManager.setOnClusterItemInfoWindowClickListener(...)
mMap.setOnInfoWindowClickListener(mClusterManager);
Issue is same for info window and marker item clicks:
same as issue #184
The demo app does actually include an example of this: https://github.com/googlemaps/android-maps-utils/blob/b153c67ad589d5e03a6362f2349fb49e3cc70c8e/demo/src/com/google/maps/android/utils/demo/CustomMarkerClusteringDemoActivity.java#L159-L174
I think the real problem was lack of visible documentation here on GitHub. I've recently updated the project and README to point to the comprehensive guide on developers.google.com which includes details on setting up handlers for cluster events.
Most helpful comment
Oh, snap. Now it's working. Sorry about that. I didn't add this line:
googleMap.setOnMarkerClickListener(mClusterManager);
Apparently it's needed.