开发者

Geo: Need to convert a "place name" into an "canonical place name"

Our users can enter their location into a free-form text field, like "Austin TX", or even "The Motor City". How can I take this information and turn it into a canonical name? For example, "Th开发者_运维问答e Motor City" would be Detroit, MI. They might even enter a zipcode or an address.

I'm planning on storing the place name, or the lat/long, or the unique id code for their location in the database. Then I can determine proximity. Is there a geo lookup api I can use for this?


Yahoo has a nice open API for dealing with this kind of thing, WOEID's (Where on earth); query the WOE DB for your freeform string, it'll give you back a WOEID, then Query the WOEID for whatever actual data you want to store. http://developer.yahoo.com/geo/geoplanet/guide/concepts.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜