Google地图API v3标记重叠 [英] Google map API v3 markers overlapping

查看:118
本文介绍了Google地图API v3标记重叠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



标记重叠时,即使图标不同,也只显示最后一个。



我不希望它在这种情况下聚集在一起,而是应该显示这两个可能通过改变坐标只是一个,但?? ??

任何解决方案??

解决方案

我认为这是一个非常优雅的解决方案,称为Spiderfying the markers。

https://github.com/jawj/OverlappingMarkerSpiderfier p>

我正在考虑使用它。



我现在所做的是使用JavaScript来创建一个花哨的弹出窗口,在一个标记位置隐藏和显示div(在PHP中创建问题,但也可以在JS上执行) )。它具有在地图上允许较少标记的副作用。



点击此地图上的黑色编号标记以查看它的行动。
http:// www.yourmapper.com/map/111/crime-reports/crime-in-metro-louisville-ky-since-jan-2003.htm


I am making an application with google maps.

When markers are overlapping only the last one is displayed even if the icons are different..

I do not want it to cluster in that case, rather it should show both maybe by changing the coordinates just a but??

Any solutions??

解决方案

I think this is a pretty elegant solution, called Spiderfying the markers.

https://github.com/jawj/OverlappingMarkerSpiderfier

I'm thinking of using it.

What I do now is use JavaScript to make a fancy popup that hides and shows divs on one marker location (created problematically in PHP, but you could do it on JS too). It has the side benefit of allowing less markers on the map.

Click a black numbered marker on this map to see it in action. http://www.yourmapper.com/map/111/crime-reports/crime-in-metro-louisville-ky-since-jan-2003.htm

这篇关于Google地图API v3标记重叠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆