Reputation: 812
I'm working on an Android App which draws path on map using Polyline options, between source to destination.
This works fine.
What I need is, if user starts from source, and instead of taking drawn route towards destination, the user takes another route, the path on map should be redrawn for user's current path.
I'm using Directions API for drawing path.
I think, I'm required to use Google Navigation API. How can use that within my app, without having to navigate to Google Maps app?
Upvotes: 0
Views: 1802
Reputation: 6791
First: Check if your current/last known location is near or falls on the path/route created.
Direction api: check if a place falls in the route path between 2 places
Second: If current/ last known location if outside or off the path/route created, send a request to get direction from the current location to the same destination.
OR
Try this
Upvotes: 1