我在另一篇Stack Overflow帖子中看到,您可以通过在网址中传递两个地址作为参数,从您的应用中打开Google地图应用。
String url = "http://maps.google.com/maps?saddr=some+address&daddr=another+Address"
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(url));
如何从应用中启动Google地图应用程序并获取从当前位置到地址的路线?
答案 0 :(得分:2)
当然,但您必须先通过GPS坐标抓住您的位置。或者,只需设置第二个位置的位置,然后让用户点击它,并使用地图本身从当前位置查找路线。