Is there any package that I could use for zipcode search.
I want to display schools that near a particular zipcode. I have no idea
how
to do this. It will be great if anyone can point me where I could find
info
Is there any package that I could use for zipcode search.
I want to display schools that near a particular zipcode. I have no idea
how to do this. It will be great if anyone can point me where I could find
info
Hm. It’s probably lots easier to find a school IN a particular zip
code instead of near one. Would that be good enough?
Do you have longitude/latitude information? I can send you the
proximity query but you need the longitude and latitude in order to
find proximity zips.
Basically what you do is find the zip code in question. Then find all
the zipcodes X miles away and then find all the schools in that range
of zipcodes.
query looks like this
@places = Place.find_by_sql ["select p.* from places p where ((3963.0
acos(sin(p.latitude/57.2958) *
sin(?/57.2958) + cos(p.latitude/57.2958) * cos(?/57.2958) *
cos(?/57.2958 - p.longitude/57.2958))) < ?)", lat, lat, lon,
distance]
check out this guys site, he really helped me out.