SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2008
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Find zipcode within 30 miles radius

    Hi ,

    I want to enter one zip code e.g 48837 and get all zip codes within the 30 miles radius from this zip code(48837).

    for example i enter 48837

    the zip codes 48831,48845 and 48862 comes within the 30 miles radius from entered zip code which is 48837 .

    script return these zip code.

    how i can do this.

    regards

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,510
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    You'd need to have a database with the geographical coordinates of the zip codes. Then you'd be able to calculate the distance between them and display only those inside the radius you set.
    Or you'd have to link to a service that'll give you the info you need. Don't know if such a service exists though.

  3. #3
    SitePoint Member
    Join Date
    Apr 2009
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you already have the latitude longitude database, you can go to ZIPCodeWorld's Developers page for sample codes on distance calculation formula.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •