Google地图 - 在现有标记周围创建多边形 [英] Google Maps - Create a polygon around existing markers
问题描述
我不知道这是否可行,但我使用谷歌地图通过叠加层上的标记绘制出实体的位置。我希望能够在所有创建的标记周围创建多边形或某种其他类型的叠加对象,突出标记的范围,排序区域图。我不知道所有的标记是从数据库中检索并映射到什么范围。
I dont know if this is possible but I use a google map to plot out positions of entities via markers on an overlay. I would like to be able to create a polygon or some other sort of overlay object around all the created markers, highlighting the extent of the markers, sort of a catchment area diagram. I wont know before all the markers are retrieved from the database and mapped what the extent is.
任何人有任何想法如何处理这个..?
Anyone have any ideas how to approach this..?
谢谢
Thanks
推荐答案
我认为您正在寻找凸点Hull of points
In数学中,Euclidean平面或Euclidean空间中的一组点X的凸包或凸包是包含X的最小凸集。例如,当X是平面的有界子集时,凸包可以可视化为橡皮筋所包围的形状伸展在X周围。
In mathematics, the convex hull or convex envelope of a set X of points in the Euclidean plane or Euclidean space is the smallest convex set that contains X. For instance, when X is a bounded subset of the plane, the convex hull may be visualized as the shape enclosed by a rubber band stretched around X.
在任意一组点上使用Google Maps API v3的示例
这篇关于Google地图 - 在现有标记周围创建多边形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!