I have some polylines (an array of coordinates, representing a route)
I also have a polygon (a rectanble made from 4 coordinates)
They are used in Google Maps (API v3).
--
I need to know if any of theese polylines intersect the polygon, and if so, wich polyline(s) intersects?
I'm hoping for a function I can send the polygon object and polyline array to, so it will return a list of intersecting polylines.
For example to be called like:
var result = checkForIntersects(radiusPoly, polylines);
The result could be "0,1" if the first two polylines intersects, or "" if none intersects.
Hope it makes sense :-)
Sample polygon and polylines available here: JSfiddle (Update 2018-02-01: Sorry, I just noticed my example no longer works. But the coordinates are there. Better than nothing, I guess.)