Friday, September 16, 2011

Route Map in Android

The following snippet shows the route between two Geo points in google map using default maps application.

Uri uri = Uri.parse(",slon&daddr=dlat,dlon");

Here saddr -> source address
        daddr -> destination address
        slat    -> source latitude
        slon   -> source longitude
        dlat   -> destination latitude
        dlon  -> destination longitude

 Intent intent = new Intent(Intent.ACTION_VIEW, uri);

No comments:

Post a Comment