I am working on a javascript application where I need to find the nearest line from a point. Every point is expressed in geo format (latitude and longitude). So I want to calculate the minimum distance of point to every line and compare that to find the nearest line.
The problem is how do I find the nearest distance to a line of a point in geo format? There are some methods given for x-y coordinate system but I don't know how to use them in geo coding format.
Can someone give me some pointers as how to do it? Though I am looking for javascript solution but even language-agnostic approach is fine.