Google Maps - Create a polygon around existing markers

后端 未结 1 1138
失恋的感觉
失恋的感觉 2021-01-22 05:30

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 sor

相关标签:
1条回答
  • 2021-01-22 05:55

    I think you are looking for the Convex Hull of the points

    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.

    Example using the Google Maps API v3 on a random set of points

    0 讨论(0)
提交回复
热议问题