Stefan,

Here's a simple taf we built to calculate the distance of all stores within a 100 mile radius of the user. You will need two tables: A stores table listing all your stores with zip codes and a locator table listing all the zip codes along with longitude and latitude (we found a CD online for a small fee). The rest is in the taf itself.

Note: I believe there are a couple of different formulas with varying margins of error. The one we used is the most accurate. It may look confusing, but if you look at it, there are very few variables – just the user's lon/lat coordinates and the radius you want to return, I believe.

Anyway, it shouldn't be difficult once you get the database of zips/lons/lats.

Best,
Chris


________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Attachment: zipfinder.taf
Description: application/applefile


Attachment: zipfinder.taf
Description: Binary data




On Apr 27, 2005, at 8:50 AM, Stefan Gonick wrote:

Hi All,

Does anyone know how to do a zip code distance search in a
database?  For instance, a customer enters their zip code, and
you return the closest stores within a 20 mile radius.  I assume
that some kind of zip code table has to be procured as well.
Does anyone know where to get this?

Thanks,
Stefan

=====================================================
Database WebWorks: Dynamic web sites through database integration
http://www.DatabaseWebWorks.com

_______________________________________________________________________ _
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to