我想知道这是否可能或现在。
现在我打开 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/