Skip to main content
December 17, 2012
Answered

Zipcode Dealer Locater

  • December 17, 2012
  • 3 replies
  • 736 views

I am trying to set up a dealer locater on our site.  My understanding is this is all math but I am confused.  I have db1 with all the zipcode information for the US in it, with the corresponding lat/long.  DB2 will have all information of my dealers in it and their location based on lat/long.  I do not understand how to take in a user supplied mileage number (5 miles, 10 miles, 25 miles, etc) and zipcode, query db1 to get the appropriate ranges that I need to query in DB2.  Please help, I have looked online and I am very confused.

This topic has been closed for replies.
Correct answer

Thanks Tim, I found this article/post of Ben's and got it working:

http://www.bennadel.com/blog/1490-Using-A-Rough-Box-Model-To-Gather-Near-By-Zip-Codes.htm

3 replies

Tim Cunningham
Participating Frequently
December 20, 2012

Ben Nadel blogged how to get approx distance if you have the latitude and longitude of two locations, let me know if that helps:

http://cfml.us/QY

Thanks,

Tim Cunningham

Correct answer
December 20, 2012

Thanks Tim, I found this article/post of Ben's and got it working:

http://www.bennadel.com/blog/1490-Using-A-Rough-Box-Model-To-Gather-Near-By-Zip-Codes.htm

Tim Cunningham
Participating Frequently
December 20, 2012

Ben Nadel is THE man.

BKBK
Community Expert
Community Expert
December 19, 2012

What you have is clear: US zipcodes and corresponding latitudes/longitudes, and dealer location. What you want remains unclear. What do mean by mileage number and appropriate range?

December 19, 2012

Any help would be most appreciated.