开发者

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 t开发者_开发技巧here 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 !


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


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));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜