0

Working on roller distance application. It has to check whether my current location is between 2 points or not. Did find many suggestions on Google but am unable to find any code or example for the solution.

enter image description here

These are the 2 locations (P1 & P2) and my current location. Aim is to check whether my current location is between P1 & P2 or not within 5 meter radius.

JGPhilip
  • 1,388
  • 17
  • 19
Mitesh Jain
  • 673
  • 1
  • 7
  • 20
  • are you drawing polyline between start and end point – akshay_shahane Feb 09 '18 at 05:43
  • @akshay_shahane : no stored location point in database and fetch from it to check my current location is in between or not. – Mitesh Jain Feb 09 '18 at 05:45
  • what you can do using google direction api get the list of lat lng between start and end points then with help of google maps utils you can find if the current location is in between two points or not PolyUtil.isLocationOnPath()... sorry i know its too much work but i cant think of any other solution hope it helps – akshay_shahane Feb 09 '18 at 05:51
  • Do you want to do it on client side or server side? and what do you mean by not within 5 meter radius? radius of what? – Kishor Pawar Feb 09 '18 at 13:12

0 Answers0