[nycphp-talk] Zip code radius
Aaron Fischer
afischer at smith.edu
Tue Jun 30 13:02:31 EDT 2009
Wanted to post my results. I have successfully created a zip code
radius function on my site, similar to a store locator. Here's a
brief recap:
1) Geocoded around 31,000 addresses sitting in my database, using
Google Maps API (http://code.google.com/support/bin/answer.py?answer=80200&topic=11364
). Modified the goodle sample code to fit my needs. One important
thing to note, I was getting lots of bad responses from the API. I
was able to fix this by adding "&oe=utf8" to the end of the request url.
2) Downloaded and modified this free zip code radius class (http://www.micahcarrick.com/04-19-2005/php-zip-code-range-and-distance-calculation.html
).
3) Downloaded the 1990 census bureau list of zips and geo coordinates
(http://www.census.gov/tiger/tms/gazetteer/zips.txt) to use as a start
point for the range lookup. More info on the census lists here (http://www.census.gov/geo/www/gazetteer/gazette.html
).
4) My code currently produces a text list of locations. I would like
to add the visual google maps display with place markers. It's not an
essential feature and I'll add as time allows. Will post results on
that later if it happens.
Thanks for everyone's helpful suggestions! Much appreciated.
-Aaron
More information about the talk
mailing list