Zip code radius search EXAMPLE
Last Post 09-11-2009 08:12 AM by Jimmy Z. 2 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
Jimmy ZUser is Offline
wading in the water
wading in the water
Posts:18
Avatar

--
09-11-2009 05:18 AM

    I wanted to share an example of using Dynamic Forms & SQLGridSelectorView 4.1(by Tresselworks).  The example is for a zip code radius search by category.

    I was originally going to use Dynamic Forms and GeoSprawl, but GeoSprawl doesn't have the ability to do searches by a category or type.

    Basically the site has a listing a various activities, .e.,g., museums, farms, playgrounds, etc.

    To implement, I used Dynamic Forms for the input values, SQLGridSelectorView to display the results.  The only other piece needed is a zip code database with latitude & longitude.  

    Dynamic Forms passes the URL string and SQLGridSelectorView executes the sproc.  There are no .dlls or 3rd party controls needed - just two modules, one sproc and one zip code database.

    To see a working example, go to demo.norristownmom.com and select ACTIVITIES -> ACTIVITIES SEARCH.  The activities are all in the state of PA, so to get results, you can use zip codes like 19444, 19128, 19403, 19426.

    Hope you enjoy.

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    09-11-2009 07:47 AM
    Cool. But how does it know if you type in 20 miles for zip code 19444, it will return entries that's within 20 miles of that zip code? Is this being magically calculated somehow through the longitude/latitude or getting data from the zip code database table? -- David
    Jimmy ZUser is Offline
    wading in the water
    wading in the water
    Posts:18
    Avatar

    --
    09-11-2009 08:12 AM
    Well, I actually left out that I use a SQL function along with the sproc. The function uses good ole fashion Trigonometry to calculate the distance between zip code entered and the zip codes in the table that contains all of the museums, playgrounds, etc. That table also has the latitude & longitude for each record. (so I've essentially prepopulated the lat/long for each record). The sproc calls the function then filters the results based on the distance and category selected.

    So the answer to your question is that it returns very accurate results.


    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi