I am building a website where users can enter classified ad-style listings. All geo fields are optional (address, state, city, zip, etc) so if they don't enter anything their ad comes up in all search results, but if they enter a zip, state, etc it should only come up for users that have filtered for that location. I want to have users select only a City, State. Can anyone point me in the direction of an article or white paper that has design tips or pattern ideas? I know this has been solved for a million times - (citysearch for example) Thanks in advance!
This is really just a matter of how you search for your results. Have your application build the SELECT statement that you run based on what input the application receives.
Click this: http://www.google.com/cse?cx=009244845836111659857%3Albvxsjj8mho&q=asp.net+zip+code+search&cof=FORID%3A0 You'll have at least 5 minutes of results.
Got that, but what about this example A record in the database has a zip code as its geographical info but no city, state, etc. (zip code = 10022) A user searchs for listings within New York NY. We want to include 10022 b/c that zip is in NY. Is this about aquiring a database of zip codes and their lattitude/longitude coordinates and comparing that to the coordinates of the user's city? Or mapping all US zip codes to a city, state? Do you know where I can get this info? Would also want to do a reverse search where user entrers a zip code of a city and we return results of that city that dont contain zips. I think I may have answered my question w/ the zip code mapped against city/state table but just wondering what others have done. Thanks