0

I'm trying to get the path between two geo points on my android app, i don't need any driving directions - just path. What I've already found myself is to draw the straight line between two geopoints (http://djsolid.net/blog/android---draw-a-path-array-of-points-in-mapview). Is it possible to get the actual path? I mean path which I can really walk, road path - not just straight line between two geopoints without parsing the google maps web URL ?

Lucifer
  • 29,392
  • 25
  • 90
  • 143
pawel
  • 5,976
  • 15
  • 46
  • 68

1 Answers1

0

I think the best solution is called android internal map activity to show route between two geo points. Please refer to the code below:

String uri = "http://maps.google.com/maps?saddr=" + currentLatitude+","+currentLongitude+"&daddr="+fixedLatitude+","+fixedLongitude;
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri));
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
startActivity(intent);

It's called built in map activity and draws a route path between current and fixed latitude and longitude.

Yurii
  • 4,811
  • 7
  • 32
  • 41