Reputation: 21
I'm looking for a way to combinate the MarkerClusterer from google-maps-utility-library-v3 with the Infobubbles. My idea is to show the Infobubbles only when the icon is unclusted (visible). And maybe see a summary for each clustericon with Infobubbles. Unfortunately I didn't find any possibility to control that Infobubbles is only visible after the unclustering. Maybe someone has an idea or an approach how to achieve this?
Thank you
Robert
Upvotes: 2
Views: 1163
Reputation: 5890
If you listen to the 'clusterclick'
event on the MarkerClusterer you will receive the cluster that is clicked in the callback. From that cluster you can call:
getSize, getMarkers, getCenter and getBounds.
With that info you can then open a InfoBubble at with the result of getCenter() and you and display the content that you want.
Upvotes: 1