Is there any way to prevent individual markers from being clustered with MarkerClusterer?
Here would be my code:
google.maps.event.addListener(marker, 'click', function() {
// prevent marker from being clustered here
});
I know I could remove the marker from the MarkerClusterer object and later add it back, but this would be somewhat complex and I’m wondering if there is any built-in functionality to do this. My browse through the documentation turned out to be fruitless, but I could be missing something.
It doesn’t look like there is any built-in functionality, but there are some things you can do to make your operations easier.
I would recommend storing the cluster on the marker for easy toggling:
OR event better, have the marker store the clusterer from the beginning: