【发布时间】:2018-04-14 06:12:36
【问题描述】:
【问题讨论】:
-
先显示一些努力。
-
阅读谷歌地图 api 文档。在你的最后做一些努力。如果遇到困难,请分享您的代码试验。阅读此page 以了解如何提出好问题。
标签: android google-maps android-studio geolocation location
【问题讨论】:
标签: android google-maps android-studio geolocation location
您可以使用这种格式的链接:
https://www.google.com/maps/search/?api=1&query=36.26577,-92.54324
并将您所在位置的latitude 和longitude 分别添加到36.26577 和-92.54324 的位置。
【讨论】:
http://maps.google.com/?q=<lat>,<lng>
使用上述格式,将您的 lat 和 lng 值传递给上述 URL 格式。
【讨论】:
您可以将它与android Intent一起使用。
String geoUri = "http://maps.google.com/maps?q=loc:" + <lat-long>;
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(geoUri));
startActivity(intent);
或者只是网址
"http://maps.google.com/maps?q=loc:" + <lat-long>;
【讨论】: