I'd like to build a search form which allows members to get results of school districts within so many miles of their own district. Is this possible? How do I start? Thanks!
The easiest way would be asking the users for their zipcode and then create a query that will only return results of school districts that are within a certain range (in terms of miles) from the users zipcode.
And to avoid asking for the users zipcode over and over again, use CFCOOKIES or something that "remembers" the users zip.
Hope this helps you.
[sub]
____________________________________
Just Imagine.
The first thing you need is a database that geocodes ZIP codes, that is, assigns some version of an X and Y coordinate to the ZIP code record. This is the "ballpark" method; ZIP areas vary in size. You can use the simple right triangle distance formula, or introduce the fudge factors for latitude and longitude if you want get fancy.
You'll still have to disclaim your tool with "as the crow flies", because you're not presenting a true point-to-point.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.