3

可能重复:
如何在 geo uri Intent 启动的地图中显示标记?

我打算使用从我的数据库中获得的一个地理位置来使用 Google 地图应用程序,GM 是否可以在我使用 URI 发送的位置放置一个图钉?

final String uri = "geo:" + location.Latitude + "," + location.Longitude + "?z=12";
MyActivity.this.startActivity(new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri)));
4

1 回答 1

7

您需要为引脚指定名称:

String uri = "geo:0,0?q="+ Lat + "," + Longitude + " (" + name+ ")";
startActivity(new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri)));

这仅适用于一个引脚。

于 2013-01-11T09:12:11.993 回答