adamzwakk
adamzwakk

Reputation: 709

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

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?

Upvotes: 1

Views: 401

Answers (1)

Andrew Leach
Andrew Leach

Reputation: 12973

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

Upvotes: 3

Related Questions