开发者

How do websites such as yelp convert a location input (zipcode, area name, county) and search with it?

What is the process or api they use to provide this feature on their websites? If it is too complication to explain can开发者_JAVA技巧 you please push in the right direction to be able to provide this feature aswell. Thank you.


Look into geocoding, geotagging and GIS

http://en.wikipedia.org/wiki/Geocoding

Like Google's API:

http://code.google.com/apis/maps/documentation/geocoding/


The key word you are looking for is geolocation for the first part, and proximity search for the second.

Google is the most prominent provider of Geolocation services, but there are others.

  • To get the latitude/longitude of an input address, see How to obtain longitude and latitude for a street address programmatically (and legally)

  • Here is one approach to do calculations on nearby locations: Get nearest places on Google Maps, using MySQL spatial data

  • And a very detailed question discussing the advantages and disadvantages of the various proximity formulas: Formulas to Calculate Geo Proximity

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜