0

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)

here

Dracarys
  • 714
  • 7
  • 16
user8282703
  • 137
  • 8

1 Answers1

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:

https://github.com/googlemaps/android-maps-utils/blob/master/library/src/com/google/maps/android/PolyUtil.java

eNVy
  • 487
  • 3
  • 10