I have
used a postal code database from http://www.greatdata.com. Basically it
is just the raw data with the longitude and latitude of the center of each
postal code.
These
are the steps to using it:
1) User enters postal code
2) Look up user's PC and get the long and lat from the
database
3) Go through the list of offices (that you created),
retrieving the PC from the offices
4) Look up the PC of the offices and get the long and lat
from the database
5) Perform the calculation to determine the distance
between two co-ordinates of long and lat (Great Data has sample
code).
6) Store that result in an array, sort the array and
display.
The
one thing you should do if you have tons of offices are to pre-sort the list of
offices, perhaps by province or something like that so you are not performing
the calculation on 200 offices for every request.
I
forget the exact cost of the database, but I think it's under $1000. It's
a one time payment, but if you maintain your subscription, then you will get
updates of the database. Overall, it's not too bad.
Good
luck.
James
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jeremy Oudit
Sent: Friday, May 24, 2002 9:13 AM
To: [EMAIL PROTECTED]
Subject: [CFTALKTor] Postal code searchDoes anyone know if there is an app or maybe a database that you can search against for Canadian postal code info?A client I have wants to allow visitors to type in their postal code to find the contact information for the nearest offices.Something similar based on Area code would be just as good too.thanks
