Android Question Geocoding: How can I draw a route between two points?654

Beja

Expert
Licensed User
Longtime User
Hello friends,
I have the lat and lon values for two points in google maps. I want to draw a route for a driver or walker to follow to reach point B. how can I achieve that. please help!
Example:
Point A: 40.787654124
Point B: -70.23454112
At this time I only have two markers after using on of the gps examples.

Thanks in advance
 

eurojam

Well-Known Member
Licensed User
Longtime User
I use Mapquest which has an open API where you can send a request via httputils and get back an json with the route. The route is calculated with OpenStreetMap and doesn't fit 100% to a google map, but in most cases it does. You can get routes for cars, pedestrians and for bycicle if needed. If you need a code sample I can provide one (PM me).

best regards
stefan
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…