Android Google Maps API v2开始导航

Lil*_*oke 2 android google-maps android-intent xamarin.android

我有一个应用程序,显示带有标记的地图.当用户触摸标记时,我想为它们开始导航.

是否有一个Intent/Activity我可以通过经度和纬度来启动用户导航应用程序?

谢谢你的帮助.

Lil*_*oke 6

我这样解决了.发布的网址类似.

Intent navigation = new Intent(
            Intent.ACTION_VIEW,
            Uri.parse("http://maps.google.com/maps?saddr=START_LAT,START_LON&daddr=END_LAT,END_LON"));
startActivity(navigation);
Run Code Online (Sandbox Code Playgroud)

其中Start是START_LON,START_LAT是经度和纬度,END_LON,END_LAT是结束

  • 顺序应该是LATITUDE,LONGITUDE而不是相反. (3认同)