如何根据Google地图中标记的相对位置制作多边形? [英] How would I make a polygon based on the relative positions of markers in google maps?
问题描述
我有一个标记列表,我想创建一个多边形(显示标记周围的区域而不是标记本身)。因此,不要让poly点是标记的直接纬度/长度,我希望poly可以围绕标记以显示它们周围的相对区域。
关于我如何能够完成这样的任何想法? 这称为凸包 。 http://www.geocodezip.com/v3_map-markers_ConvexHull.asp 中有一个示例其使用在 http://softsurfer.com/Archive/algorithm_0203/algorithm_0203.htm中描述的算法a>
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?
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
这篇关于如何根据Google地图中标记的相对位置制作多边形?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!