给定经纬度,查询地点的确切地址。

huangapple go评论87阅读模式
英文:

Exact address of a place given its latitude and longitude

问题

我正在开发一个网络应用程序,需要根据给定的纬度和经度获取“精确”的地址。我尝试了地图地理编码 API,但它没有提供精确的地址。我认为地点 API 是一个不错的选择,但我不知道如何使用它。

我正在使用 Golang。

英文:

I'm developing a web app wherein I need to get the "exact" address given a latitude and longitude pair. I tried Maps Geocode API as well but it doesn't give the exact address. I think Places API would be a good option alas I don't get how to use it.

I'm using golang.

答案1

得分: 4

在我看来,如果你认为逆地理编码的结果不好,那么地点 API 的结果可能也不会让你更开心。

以下是地点 API 的示例:

而逆地理编码的示例如下:

正如你所看到的,地点 API 的结果中没有地址信息。只有在添加 radius 参数后,你才能获得第一个地址:

https://maps.googleapis.com/maps/api/place/search/xml?location=55.753720,37.620144&radius=100&key=google_map_api_key

对我来说,尝试确定在100米范围内哪个地址是正确的比简单地使用逆地理编码的最佳结果更复杂。

英文:

IMO, if you think that reverse geocoding results a bad, Places API results wouldn't make you happier.

Here is the sample of Places API

And Geocoder to compare

As you can see, there is no address in Places API results. The first addresses you may get only after addition radius parameter:

https://maps.googleapis.com/maps/api/place/search/xml?location=55.753720,37.620144&radius=100&key=google_map_api_key

For me, trying to decide which address within 100 meters is right is more complex task than simple use of the best possible result from geocoding.

huangapple
  • 本文由 发表于 2017年1月13日 14:39:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/41628762.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定