简体   繁体   English

如何在Google地图上点击时获得经度和纬度

[英]How to get latitude & longitude onclick on google map

I want to find the path between two locations on Google Maps which I have clicked. 我想在单击的Google地图上找到两个位置之间的路径。 So when I click anywhere on the map I want to get the latitude & longitude. 因此,当我在地图上的任意位置单击时,我想获取经度和纬度。 How can I do that? 我怎样才能做到这一点?

I don't know how much research you have done but there are tons of simple to follow tutorials to do what you are asking about. 我不知道您做了多少研究,但是有很多简单的教程可以帮助您完成所要询问的事情。 I'm sure you have a specific goal you are trying to accomplish but you should take a look at this open source project I came across when I googled android gps services 我确定您有一个特定的目标要尝试实现,但是您应该看看在我搜索android gps服务时遇到的这个开源项目

http://code.google.com/p/gpslogger/ http://code.google.com/p/gpslogger/

take a look through the source code in that project and I guarantee you will see how to do exactly what your asking. 看一下该项目中的源代码,我保证您会明白如何正确地执行您的要求。

I'm pretty sure you would use the android.location services so you could also google how to use those. 我很确定您会使用android.location服务,因此您也可以使用Google搜索这些服务。 But in order to see them in use you definitely should check out that link I posted above. 但是,为了查看它们的使用状况,您绝对应该查看我上面发布的链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM