Google map Marker cluster 谷歌地图图标聚合
- 前端
- Stella981
- 0
===
Have you wonder how do some map app provide functions to cluster icons/markers?
Here is one solution:
http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.1.2/docs/examples.html
Inside the code:
MarkerCluster obj
hide all markers first, calculate the markers distance, cluster them together in pixel distance and then show the clustericon
add markers
resetviewport
redraw
createClusters_
addToClosestCluster_
distanceBetweenPoints_
if two markers are closer than 40000, cluster them together
new Cluster
Cluster obj
ClusterIcon obj, extended from overlayview
免责申明:本站发布的内容(图片、视频和文字)以转载和分享为主,文章观点不代表本站立场,如涉及侵权请联系站长邮箱:xbc-online@qq.com进行反馈,一经查实,将立刻删除涉嫌侵权内容。