开发者

google maps api V3 - MarkerClusterer combine with Infobubble

I'm looking for a way to combinate the MarkerClusterer from google-maps-uti开发者_Go百科lity-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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜