I am building a navigation app on android using Google Maps. It calls a server which returns the route upon supplying source and destination points to it. Whenever a user moves in wrong direction, the app re-routes user to a new path based on his current LatLng to destination. However, I want this path to be returned always in the direction of user's movement. Can you suggest any algorithm for this or any workaround? I want to implement this on client side only, so I wont be sending a re-route flag to the server.