IT-Fan
IT-Fan

Reputation: 413

Android google maps APIs get directions programming


I am new to Android google maps APIs. I am learning it from this TUT : http://mobiforge.com/developing/story/using-google-maps-android but there isn't any mention of getting the direction between 2 points. Is there any APIs can do this task in http://code.google.com/android/add-ons/google-apis/reference/index.html ?

Thank in advance !

Upvotes: 4

Views: 14505

Answers (2)

Idistic
Idistic

Reputation: 6321

Google maps API does not provide any routing capabilities. You can use an intent to fire the google navigator (assuming it's on your device) or the the google maps version (as mentioned by Hwa Rang)

There are some tutorials to do this outside of the API, but be advised the google prohibits implementing turn by turn navigation, apparently simple routing is ok though.

How to add routing to google maps

Upvotes: 3

nahwarang
nahwarang

Reputation: 653

There is an intent to the Google Maps app you can use.

Intent i = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("http://maps.google.com/maps?saddr=" + saddr + "&daddr=" + daddr));

Upvotes: 2

Related Questions