Getting user location through iphone safari, and then redirect to site

Discussion in 'Web Design and Development' started by ahdrage, Aug 19, 2010.

  1. ahdrage macrumors newbie

    Aug 19, 2010
    I want to make a website where I first get the user location.
    If the user location is within a certain area, like 50 meters within a certain coordinate.
    It should then redirect to a specific webpage.
    How would I do this?

    I have read through the documentation here:
    But it doesn't say how I can make a decision based on where the user is currently located.

    Thanks for your help!
  2. ianray macrumors 6502

    Jun 22, 2010
  3. ahdrage thread starter macrumors newbie

    Aug 19, 2010
    Been reading through that article now.
    Would it work if it used:

    inteface Coordinates {
    readonly attribute double latitude;
    readonly attribute double longitude;

    Could I then convert the latitude and longitude to a number and then make something like:

    if latitude is over 50 and if longitude is under 80
    then redirect to

    Thanks for your help
  4. ahdrage thread starter macrumors newbie

    Aug 19, 2010
    Yep. My problem is that i'm not sure how I can redirect the users to another url when I have got the gps coords.

Share This Page