views:

1268

answers:

3

Hi guys, 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 do this with 2 ones and the route between them?

I must admit that I'm quite new to Android and the maps-API...

+2  A: 

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.

BrennaSoft
+3  A: 

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.

Praveen Chandrasekaran
One note, you might be running afoul of the Google Maps api if you use it to obtain driving directions (they removed this capability from the android maps api).
BrennaSoft
yep. but we can do manipulations with the kml file of maps. in my answer, they are retriving the coordinates points to the route from the google maps kml file. check the RoadProvider.java the are build the url to get the road coordintes from the kml file.
Praveen Chandrasekaran
Thank you, that's excactly the thing I was looking for :)I think this will help for understanding and re-program it by myself.Thanks again :)
poeschlorn
A: 

I'm am currently doing the same thing. How is that drawing thing going ?

Manic