0

Possible Duplicate:
Google Maps output=kml broken?
Why retrieving Google Directions for Android using KML data is not working anymore?

I am just new in Google map, just started the google maps I did the the current location on Overlay now, I m trying how to find route from current location to given location in Google map and they show the route also on the maps in map Overlay android ,I read the many articles but I did get the good one , if some one have the good tutorial please share with me or have good source code .

Community
  • 1
  • 1
Rishi Gautam
  • 1,948
  • 3
  • 21
  • 31

1 Answers1

0

You can directly call the inbuilt google map applicaion using the following code.

  String uri = "http://maps.google.com/maps?f=d&hl=en&saddr="+curretnlatitude+","+currentlongitude+"&daddr="+destlocation.getLatitude()+","+destlocation.getLongitude();
  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);
Chirag
  • 56,621
  • 29
  • 151
  • 198
Sanket Kachhela
  • 10,861
  • 8
  • 50
  • 75
  • 1
    what if User uninstalled inbuilt Map application? – Mohammed Azharuddin Shaikh Oct 31 '12 at 05:54
  • ok sir when we pass the uri in intent the we call method through intent object can we make the class "com.google.android.maps.MapsActivity"and here in this class we which type of this class in this class we can add extent overlay class in MapActivity class. – Rishi Gautam Oct 31 '12 at 06:04