KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Problem Users can provide up to four latitude and longitude coordinates, in any order. They do so with Google Maps. Using Google's Polygon API (v3), the coordinates they select should highlight the selected area between the four coordinates. Question How do you sort an array of latitude and longitude coordinates in (counter-)clockwise order? Solutions and Searches StackOverflow Questions Drawing resizable (not intersecting) polygons How to sort points in a Google maps polygon so that lines do not cross? Sort Four Points in Clockwise Order Related Sites http://www.daftlogic.com/projects-google-maps-area-calculator-tool.htm http://en.literateprograms.org/Quickhull_%28Javascript%29 http://www.geocodezip.com/map-markers_ConvexHull_Polygon.asp http://softsurfer.com/Archive/algorithm_0103/algorithm_0103.htm Known Algorithms Graham's scan (too complicated) Jarvis March algorithm (handles N points) Recursive Convex Hull (removes a point) Code Here is what I have so far: <c
Tags (comma-separated)
Save Edits
Cancel