• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

ZipCode Proximity Search

LEGEND ,
May 18, 2006 May 18, 2006

Copy link to clipboard

Copied

I'm starting to develop a site that needs to be searchable by ZipCode and
proximity to the ZipCode (i.e. within 15 miles of 63139)

Anyone know of a good free or low-cost way of doing this?

Thanks,

Chris


TOPICS
Advanced techniques

Views

451

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 18, 2006 May 18, 2006

Copy link to clipboard

Copied

Here are a couple for you to take a look at:
http://coldfusion.sys-con.com/read/154258.htm
http://www.webmonkey.com/webmonkey/05/32/index4a.html?tw=programming

In fact The sys-con one actually references the webmonkey one.

--
Bryan Ashcraft (remove brain to reply)
Web Application Developer
Wright Medical Technologies, Inc.
=============================
Macromedia Certified Dreamweaver Developer
Adobe Community Expert (DW) :: http://www.adobe.com/communities/experts/


"Christopher Hayes" <cbhayes@sseinc.com> wrote in message
news:e4ieuf$cn5$1@forums.macromedia.com...
> I'm starting to develop a site that needs to be searchable by ZipCode and
> proximity to the ZipCode (i.e. within 15 miles of 63139)
>
> Anyone know of a good free or low-cost way of doing this?
>
> Thanks,
>
> Chris
>


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 18, 2006 May 18, 2006

Copy link to clipboard

Copied

YOU ROCK!

Thanks so much.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 18, 2006 May 18, 2006

Copy link to clipboard

Copied

Very welcome. Glad I could help.

--
Bryan Ashcraft (remove brain to reply)
Web Application Developer
Wright Medical Technologies, Inc.
=============================
Macromedia Certified Dreamweaver Developer
Adobe Community Expert (DW) :: http://www.adobe.com/communities/experts/


"Christopher Hayes" <cbhayes@sseinc.com> wrote in message
news:e4ih9j$fmu$1@forums.macromedia.com...
> YOU ROCK!
>
> Thanks so much.
>


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 26, 2006 May 26, 2006

Copy link to clipboard

Copied

Not sure if you already development your app but you can find CF Tags in the Exchange (free ones at that) which will do this or at least get you started.

http://www.macromedia.com/exchange

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 26, 2006 May 26, 2006

Copy link to clipboard

Copied

LATEST
This is what I use, found it somewhere out there on the net

SELECT b.zipcode, b.state,
(3956 * (2 * ASIN(SQRT(POWER(SIN(((a.latitude-b.latit­ude)*0.017453293)/2),2) + COS(a.latitude*0.017453293) *
COS(b.latitude*0.017453293) * POWER(SIN(((a.longitude-b.long­itude)*0.017453293)/2),2))))) AS distance
FROM zipcodes a, zipcodes b, zipcodes c
WHERE
a.zipcode = '02134' AND # <-- Your starting zipcode
a.zipcode = c.zipcode AND (3956 * (2 * ASIN(SQRT(POWER(SIN(((a.latitude-b.latit­ude)*0.017453293)/2),2) + COS(a.latitude*0.017453293) * COS(b.latitude*0.017453293) * POWER(SIN(((a.longitude-b.long­itude)*0.017453293)/2),2)
)))) <= 5 # <-- Your target radius
GROUP BY distance

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation