Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect deviation from selected route in android map

I want to draw route between two points. I did this successfully. But how to know if the user deviated from drawn path or not. So that I can suggest user to notify alternative path to reach their destination. Like what google map navigation did. Am working on it and till now I could't find any answer for this. Please suggest some approach to me to find deviation from selected route.

Thanks in advance.

like image 716
Ria Avatar asked Oct 20 '25 04:10

Ria


1 Answers

Use PolyUtil.isLocationOnPath(...) from Google Maps Android API utility library.

like image 73
Marian Paździoch Avatar answered Oct 21 '25 18:10

Marian Paździoch