javascript 将坐标转换为地名
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3641984/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Convert coordinates to a place name
提问by Vinzcent
I am using the HTML5 Geolocation API to find the longitude and the latitude from the users of my site. This works, but now I would like to show on the screen "You currently are in ...". So I need to convert these coordinates I get from the Geolocation API to a place name.
我正在使用 HTML5 Geolocation API 从我的网站的用户那里找到经度和纬度。这有效,但现在我想在屏幕上显示“你目前在......”。因此,我需要将从 Geolocation API 获得的这些坐标转换为地名。
I tried a bit with Google Maps API, but I didn't get it working.
我尝试了一些 Google Maps API,但没有成功。
Does anyone knows how to do this?
有谁知道如何做到这一点?
回答by Pekka
The Google Maps API Docshave what seems to be a complete reverse geocoding example. (Note that this is the new V3 API!)

