In my application i want to display the route from current location to the given location on map. Can anyone tell me how i can do this.
Thanks.
In my application i want to display the route from current location to the given location on map. Can anyone tell me how i can do this.
Thanks.
That's a good way, but an easier way to do it is if you don't mind opening an intent is to
open the url in the browser, which invokes google maps or any other navigator.
Like the following,
Uri uri = Uri
.parse("http://maps.google.com/maps?&saddr=" + mCurrentLatitude+","+mCurrentLongitude+"&daddr="+ mLatitude +"," +mLongitude);
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);