android - 打开 Google Maps for Android Navigation with multiple coordinates as waypoints

标签 android google-maps

我想知道这是否可能或现在。

现在我打开 Google map ,从当前用户位置导航到一组定义的坐标,如下所示:

final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("google.navigation:q=" + String.valueOf(getDestinationLatitude()) + "," + String.valueOf(getDestinationLongitude())));

intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.driveabout.app.NavigationActivity");
startActivity(intent);

在当前位置和最终目的地之间是否可能有多组坐标,所以去点 a、点 b,然后最后到目的地点 c。 ?

最佳答案

在前往某个目的地的途中可能有多个航路点。这可以通过使用 Directions API 来实现.这个 API 也会给你 legs[]steps[]数组,它可以帮助您正确实现和返回从源到目的地的可能路径,涵盖沿途的所有航路点。

有关示例实现,请查看此 link .

关于android - 打开 Google Maps for Android Navigation with multiple coordinates as waypoints,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27837408/

相关文章:

google-maps - 带谷歌地图的 QTP

android - 如何使用广播接收器检测蓝牙状态变化?

android - 如何在 GalleryView 中显示 SD 卡中的图像

python - 纬度和经度坐标的半径

google-maps - 如何从移动 Safari 浏览器链接到 native Google Maps iOS 应用程序

javascript - 单击一个时关闭所有其他信息窗口

Android:: View 知道它何时滚动吗?

android - 为什么android中有ListVIew?

android - 使用 AsyncTask 加载更多 - Android

javascript - 从用户创建的谷歌地图折线中删除节点