how to do location based search

╄→гoц情女王★ 提交于 2019-11-28 13:50:56

It seems that what you're looking for is a GIS (Geographical Information System) in which each (or some) piece of information is linked to its geographical location. Such sistems allow to perform spatial searches on those geographical location, eg. "give me all stores in a 5 mile radious from this position which sells a specific product" (combining spatial and traditional searches is also possible).

Now some examples of technologies you can use:

  1. PostgreSQL + Postgis: This opensource combination of database and geographical extension is powerful enough for most of basic user needs. You can start from here
  2. MySql Spatial
  3. Oracle Spatial
  4. ArcSde (ESRI)

You'll want to start with a database of cities, states and zip codes with their corresponding latitude and longitude. Here's a link to a site where you can download such a database for free.

Next you'll need an algorithm to find which cities/zip codes are within an X mile radius of the city/zip the person entered. Here's another link that should explain how to do that.

You might wanna have a look at GeoNames.

I have written a .NET WCF client for GeoNames, available here.

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