Reputation: 54949
I am looking to integrate Directions between a Lat, Long and the present location of the User. I would want at the click of the button to direct the user to the installed Google Maps/ Other Apps and show the directions.
I search SO and Google but couldn't find a good source and hence am posting this Question.
Tour Bangalore seems to be able to do it. Couldnt find documentation on how to achieve this
Upvotes: 2
Views: 366
Reputation: 32016
The only official intents documented are given here. They do not include directions.
It has been noted that the following intent structure works with Google Maps. It seems the current Google Maps ingests the google maps http requests. It is probably the method used by the apps you've seen. However, it likely only works with Google Maps, and since it appears to be undocumented, there is no guarantee it will continue to work with future version of Google Maps.
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,Uri.parse("http://maps.google.com/maps?daddr=33.881894,-92.199623&saddr=My+Location"));
where daddr
is the destination location, and saddr
is the source location. They can either be lat/lng's or search terms. "My+Location" is a search term in the above example, so it unlikely to work in locales with a language other than English.
Upvotes: 2
Reputation: 1006664
There is no documented and supported Intent
structure for this, sorry. You can bring up a map on a point, but not force Maps to obtain directions.
Also, bear in mind that:
Upvotes: 2