Android 显示已安装应用程序中两点之间的路线

Android 显示已安装应用程序中两点之间的路线,android,google-maps,maps,Android,Google Maps,Maps,如何显示将显示两点之间路线的活动 这将启动安卓手机上安装的地图应用程序。找到了方法 Uri uri = Uri.parse("http://maps.google.com/maps?f=d&saddr=startLat%20startLng&daddr=endLat%20endLng&hl=en"); Intent it = new Intent(Intent.ACTION_VIEW,URI); startActivity(it); 其中STARTAT,STARTNG,

如何显示将显示两点之间路线的活动

这将启动安卓手机上安装的地图应用程序。

找到了方法

Uri uri = Uri.parse("http://maps.google.com/maps?f=d&saddr=startLat%20startLng&daddr=endLat%20endLng&hl=en");
Intent it = new Intent(Intent.ACTION_VIEW,URI);
startActivity(it);
其中STARTAT,STARTNG,endLat,endLng-坐标(38.899533,-77.036476,…)