I'm developing an app for android that uses google maps API, it's all right with the app the problem is in the webservice that handles the information gathered by the app, at some point I create a Polyline in the app and send the coordinates to WS, I need to check in WS how far from any point on the line I've created for example, suppose my line starts at point -25.428781,-49.263291
and ends at point -25.431941,-49.261888
, I need to know the distance from point -25.431069,-49.263251
of my LINE, not the distance from the third point to the first and nor from the third point to the second, I need to know the distance from the LINE. In Android it has a library that does this to Google's own android-maps-utils, however I could not use it in my WS because it is a .aar
package and I'm using maven, I accept suggestions for solutions directly to the problem as well as workarounds for adding this .aar
to my project as both would solve the problem. For simplicity I leave here the image of the map:
I need to know the distance of the GREEN line, between the reference point and the route.