this a direction between two points (A) and (B) if i have new point (C) how can i check if point (C) falls on the direction between (A) and (B)
Asked
Active
Viewed 872 times
1 Answers
1
You may use the Geometry library in the Google Maps API to determine if a point lies on or near a line. See example here:
https://developers.google.com/maps/documentation/javascript/geometry#isLocationOnEdge
For Android:
https://github.com/googlemaps/android-maps-utils
The isLocationOnEdge function is implemented here:

eNVy
- 487
- 3
- 10
-
i want a solution for android – user8282703 Jun 23 '18 at 22:05
-
@user8282703 I have updated the answer with link to android utility. – eNVy Jun 23 '18 at 22:13
-
thank you, but it is a very complex code how can I use this method the second parameter takes a list of latlng polylines. must i draw polylines between two pionts and get latlng of this points ? – user8282703 Jun 24 '18 at 14:41
-
You will use the polyline of your route on which you want to find the point. – eNVy Jun 24 '18 at 15:44