我有一个 android 应用程序,我想在其中一个地方调用 maps.google.com 意图并显示从源到目的地的方向。
但是当我使用它时,我希望地图自动动画到方向路径。
我在下面使用来调用地图意图
String saddr = "current location";
String daddr = "other location";
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("http://maps.google.com/maps?saddr="+ saddr+ "&daddr="+ daddr));
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
意图正确调用并向我显示地图,并绘制路径但不动画到那个地方。