How would I make a polygon based on the relative positions of markers in google maps?

谁说胖子不能爱 提交于 2019-12-01 09:49:16

问题


I have a list of markers that I want to create a polygon around (showing the area around the markers and not the markers themselves). So instead of having the poly points be the direct lat/long of the markers, I want the poly to "wrap" around the markers to show the relative area around them.

Any ideas on how I could accomplish something like this?


回答1:


This is called a convex hull. There's an example at http://www.geocodezip.com/v3_map-markers_ConvexHull.asp which uses the algorithm described at http://softsurfer.com/Archive/algorithm_0203/algorithm_0203.htm



来源:https://stackoverflow.com/questions/10415143/how-would-i-make-a-polygon-based-on-the-relative-positions-of-markers-in-google

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!