Get nearby street addresses within a radius

与世无争的帅哥 提交于 2019-12-22 08:02:14

问题


I would like to retrieve a list of all the street addresses within a small range on a geopoint.

A scenario for use is for a user to select his/her current address from a list of addresses (within say 50 meters) of current location, since location retrieval is not going to be accurate enough.

I am wondering if that is possible using Google maps API? Otherwise does anyone knows an alternative API that I can use for this purpose?

From what I've seen, although the Google maps reverse geocoding service returns a number of "addresses" for a geopoint they are usually just different representations of the address, rather than addresses near location.

I've seen some similar questions on SO but none had the answers I am looking for.


回答1:


I was able to get the kind of results I was looking for using a combination of APIs.

First I get the names of the nearby streets using Geonames' "Find nearby streets"

Then for each street I get a geopoint and run it by TomTom's Reverse Geocoding method of their Map Toolkit API, that gives me the min and max street number values for each of the streets.



来源:https://stackoverflow.com/questions/14513443/get-nearby-street-addresses-within-a-radius

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!