I know there are various discussions on SO about line intersections and the math behind it. I am familiar with the math.
This post nicely explains an algorithm one can implement: Determine if two lines intersect
However, I was wondering whether one can do this directly in Google Maps. I am drawing various lines on a Google Maps and my aim is to determine how many lines any given line crosses/intersects and if so where geographically does the intersection occur. I want to auto render the lines with a set criteria that penalizes intersections and factoring in other optimization criteria. Computation speed is a factor as I have thousands of lines.
Below is an example picture of my application with lines interesting.