Hi Alan, There was a thread about this a while back. I got my zip code database from http://www.zipcodeworld.com/. But I remember someone posting a cheaper alternative.
I also posted some code (in PHP not Witango) for performing the distance calculations using latitude and longitude, but I think someone has done this in Witango. For what it's worth, here's the math I'm using (php syntax, $var['index']); it's as the bird flys not as the monkey measures :) There were some alternative methods posted last time as well. and SUBSTRING(user_addresses.zip,1,5) = zipcodes.zipcode and sqrt(power(69.1*(zipcodes.latitude - " . $zip['latitude'] . "),2) + power(69.1*(zipcodes.longitude-" . $zip['longitude'] . ")*cos(zipcodes.latitude/57.3),2)) < " . $_POST['within']; ________________________________________________________ Matt Muro [EMAIL PROTECTED] Harvard University phone: 617.998.8522 Division of Continuing Education fax: 617.495.9176 [email protected] on Thursday, July 28, 2005 at 6:58 PM -0500 wrote: >Hey guys, > >I was wondering, how do those sites work where it lets you search for >lets say a business of a certain type that is x miles away from >zipcode xxxxx where it lets you put in a distance and zipcode? > >I cant think of how to even begin on that one, do they store longitude >and latitude in a database or something? > >Any ideas? > >Thanks! >Alan ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
