在Google地图中,如何使多个重叠的标记在单击时打开自己的信息窗口 [英] How can you make multiple overlapping markers in Google Maps open their own infowindow when one is clicked
问题描述
尝试OverlappingMarkerSpiderfier
https://github.com/jawj/OverlappingMarkerSpiderfier
这里有一个演示 - http://jawj.github.com/OverlappingMarkerSpiderfier/ demo.html
它尝试提供与地球Api相同的集群行为。
I am using Google Maps API V3 in javascript. I have multiple markers that are in a close proximity to each other. I want to make it so that when a user clicks a marker the infowindow of that marker and any markers overlapping it will open (I need to bubble the event click to all the other markers that overlap the clicked pixel). I can get the infowindow of the highest z-indexed marker to open, but I need to open the windows of the markers underneath too. Can this be done, and if so how?
Try OverlappingMarkerSpiderfier
https://github.com/jawj/OverlappingMarkerSpiderfier
There is a demo here - http://jawj.github.com/OverlappingMarkerSpiderfier/demo.html
It attempts to give the same 'clustering' behaviour as the Earth Api.
这篇关于在Google地图中,如何使多个重叠的标记在单击时打开自己的信息窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!