Android 通过源和目标的意图打开地图
对不起我的英语 这段代码运行良好,但是,它打开了多条路由。如果我点击路线,它就会出现在地图上Android 通过源和目标的意图打开地图,android,google-maps,android-intent,Android,Google Maps,Android Intent,对不起我的英语 这段代码运行良好,但是,它打开了多条路由。如果我点击路线,它就会出现在地图上 我的问题是,有没有任何方法可以让我直接跳转到地图,而无需用户交互 这是您要查找的默认位置吗?这已经得到了回答:我认为没有办法改变多条路线。 Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("http://maps.google.com/maps?saddr=20.344,34.34&daddr=20
我的问题是,有没有任何方法可以让我直接跳转到地图,而无需用户交互 这是您要查找的默认位置吗?这已经得到了回答:我认为没有办法改变多条路线。
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("http://maps.google.com/maps?saddr=20.344,34.34&daddr=20.5666,45.345"));
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
startActivity(intent);