self-intersection

Google Maps Polygons self intersecting detection

坚强是说给别人听的谎言 提交于 2019-11-26 21:29:14
问题 I'm trying to implement a polygon self intersection algorithm from Google Maps API V3 polygons. The goal is just to detect if yes or no, a simple polygon drawn by the user is self crossing. I have found this very interesting link, but it assumes that coordinates of the polygon's vertices are given on geoJSON format. However, this isn't my case ; I'm only able to retrieve polygons coordinates using polygon.getPath() into a polygoncomplete event. This is how i retrieve the coordinates : google