Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Feb 2014
    Posts
    3
    Member #
    38501

    web map services

    Hi folks, new member here.

    I am just barely dipping my toes in to HTML and CSS so far, but I have a website idea that I plan on turning into a reality in the future. However, before I go too far I'm wondering if there are further topics I should delve in to for a very important aspect of the website.

    As basically as I can describe it, I want to create a base of user profiles with their locations and details stored and then others will put in their information to search for those users within a certain geometrical radius. Kind of like when you put in your zip code and a website locates businesses near you, but with people instead of businesses. What should I start looking in to in order to learn how to do this?

    Please keep it in layman's terms so that I can follow along. I'm not looking for an explanation because it would go over my head right now anyways, but resources for learning would be awesome.

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,772
    Member #
    5580
    Liked
    723 times
    You should search for Google Map applications that describe the ability to have a database of businesses and the map shows their locations. You're doing the same thing with people instead of businesses. There are scripts that already deal with businesses and real estate sites that sell homes, etc.

    Some things to consider ... zipcodes are bad location points. Two people could put in the same zipcode but live 5 miles apart. Another person entering the same zipcode might be 50 feet apart. Zipcodes are just a point somewhere in the middle of the zipcode zones.

    People entering addresses can also be a problem as Google sometimes places markers on the wrong side of a street (for example).

    Determine the accuracy required before you spend too much time on this. Also, are people willing to post their locations on the internet?


  4. #3
    Junior Member
    Join Date
    Feb 2014
    Posts
    3
    Member #
    38501
    Quote Originally Posted by mlseim View Post
    You should search for Google Map applications that describe the ability to have a database of businesses and the map shows their locations. You're doing the same thing with people instead of businesses. There are scripts that already deal with businesses and real estate sites that sell homes, etc.

    Some things to consider ... zipcodes are bad location points. Two people could put in the same zipcode but live 5 miles apart. Another person entering the same zipcode might be 50 feet apart. Zipcodes are just a point somewhere in the middle of the zipcode zones.

    People entering addresses can also be a problem as Google sometimes places markers on the wrong side of a street (for example).

    Determine the accuracy required before you spend too much time on this. Also, are people willing to post their locations on the internet?
    I appreciate the input. The ultimate goal is to go for exact addresses. The dream I have in mind won't actually show them where the other person lives, only that it's within a given range and then it will put the two within contact directly.

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,772
    Member #
    5580
    Liked
    723 times
    OK ... you will be using the same Google Map mash-ups and scripts that a real estate agent would use to list homes. They have a Google Map with a location, and you can enter a zipcode or address and get all listings within a defined radius. Your "houses" will be "people".

    You could even customize the scripts to use a person's photo instead of the "house photo".

    Example:
    Buy this script for $40 and utilize everything they use for the database and Geolocalized search.
    Rip it apart and make your own program out of it.
    PhpMyEstate - Real Estate PHP Script - Start Your Own Real Estate Agent Website

    Doing that will require a lot of PHP/MySQL programming experience, but the main parts are already there. You don't have to reinvent it.


  6. #5
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,482
    Member #
    425
    Liked
    2783 times
    That's a very tall order for one reason...calculating the distance between two zip codes and by extension users. Assuming you have the GPS coordinates for each zip code (which is easy enough to get... U.S. Zip Code Database list, Canadian Postal Codes, with free online zip code lookups. can provide you with that info and it's pretty accurate, there's the matter of calculating the exact distance between the two points. Seems like a simple enough calculation, but it's very processor-intensive since you're not dealing with flat distances, but rather spherical ones.

    Here's a formula commonly used to make these calculations.

    Haversine formula - Wikipedia, the free encyclopedia

    There really isn't a layman's terms explanation for the Haversine formula or for doing what you want to do. It's a pain in the ***. I know, because I've done similar things. It's about as easy as juggling eight katana blades while buck naked, balancing on a unicycle, and trying to avoid a spitting cobra.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  7. #6
    Junior Member
    Join Date
    Feb 2014
    Posts
    3
    Member #
    38501
    I'm trying to make sense of the Google Maps API information. They offer a service called geocoding that turns addresses into coordinates. I think it would be a beast to tackle but I could see a function that does a simple distance formula using those coordinates to determine if addresses fall within a specified radius of one another. I'm still looking into all the different functions though. Just throwing out ideas.

  8. #7
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,482
    Member #
    425
    Liked
    2783 times
    Yeah, that's one way to go about it, but the coordinates won't always be quite accurate. They'll be close, but not quite accurate in all cases.

    The way I worked around it when I did calculations like this is to use a square of sorts first to get my distance...basically if any points didn't fit in the square, they'd be rejected right away. That eliminates a lot of unnecessary distance calculation (no point in calculating distance between two people across the country from one another, right?) Then I envisioned my rough circle inside of the square and used SQL Server's Geography datatype to do the calculations. It's still harsh, especially if you have several similar points; again, the formula is complex and requires a lot of computational power. But at least you're not dealing with as many possible users to start with.

    Like you said, it's a beast...and you have no idea how much of a beast until you've tried it.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  9. #8
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,772
    Member #
    5580
    Liked
    723 times
    Also know that Google and Yahoo, which both offer API's for Geolocation functions, have limitations on how many times you can access per day, week, month, etc. To exceed those limitations will require a payed subscription. You probably won't have an issue if you don't get too many visitors each day, but if you happen to get over 1000 people a day, it might be a problem.

    If you wish to examine the accuracy of Google Map GPS, I have a map application I made that allows me to drag an 'X' around and view the exact GPS location of the marker. It's default is St. Paul, Minnesota, but you can relocate the marker and see how it works. Switch to satellite and find your house. Zoom in and put the marker in your back yard. Then use a handheld GPS to compare your coordinates with Google. You should be within 3 meters (radius).

    Here's the test script: http://www.catpin.com/gps

    You can actually view the HTML and copy it yourself.


  10. #9
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,482
    Member #
    425
    Liked
    2783 times
    That's one of the reasons I suggested downloading the zip-codes.com database. They've got the GPS coordinates in there, so you don't need to call Google APIs to do anything. You can get your two coordinates and calculate the distance from there.

    It's not a bad idea once in a while to check it on an API to see if it's right, but zip-codes.com also updates their stuff I think once a month (usually around the 10th if I recall correctly).
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:16 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com