Home » Android » android – How to display a route between two geocoords in google maps?

android – How to display a route between two geocoords in google maps?

Posted by: admin April 23, 2020 Leave a comment

Questions:

Possible Duplicate:
J2ME/Android/BlackBerry – driving directions, route between two locations

I’m just writing an App for displaying the route between two coords (lat, long) in google maps view.
Displaying an single coord (even with a marker) works fine, but how to draw route between two point with 2 markers?

I must admit that I’m quite new to Android and the maps-API…

How to&Answers:

this is working example link. check it out. it helps to create the route overlay on the map. here is the complete source code for that.

Answer:

Your route will be a list of points so you have to create a route overlay class. And in the draw method of the overlay class you have to draw a Path between the points.