谷歌地图API V3 - 同一地点的多个标记 [英] Google maps API V3 - multiple markers on exact same spot
问题描述
我搜索谷歌,并找到一些解决方案,但他们大多似乎是对于API的V2或者没那么好。理想情况下,我希望有一种解决方案,您可以点击某种组标记,然后显示标记聚集在他们所在的位置。
任何人遇到此问题或相似,并会分享一个解决方案?
OverlappingMarkerSpiderfier 。点击有一个演示页面,但他们不显示标记,其是完全在同一地点,其中只有一些非常接近一起。 -vor-ort /rel =noreferrer> http://www.ejw.de/ejw-vor-ort/ (向下滚动地图并点击几个标记以查看蜘蛛效果)。/ b>
这似乎是解决您问题的最佳解决方案。
Bit stuck on this one. I am retrieving a list of geo coords via JSON and popping them onto a google map. All is working well except in the instance when I have two or more markers on the exact same spot. The API only displays 1 marker - the top one. This is fair enough I suppose but would like to find a way to display them all somehow.
I've searched google and found a few solutions but they mostly seem to be for V2 of the API or just not that great. Ideally I'd like a solution where you click some sort of group marker and that then shows the markers clustered around the spot they are all in.
Anybody had this problem or similar and would care to share a solution?
Take a look at OverlappingMarkerSpiderfier.
There's a demo page, but they don't show markers which are exactly on the same spot, only some which are very close together.
But a real life example with markers on the exact same spot can be seen on http://www.ejw.de/ejw-vor-ort/ (scroll down for the map and click on a few markers to see the spider-effect).
That seems to be the perfect solution for your problem.
这篇关于谷歌地图API V3 - 同一地点的多个标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!