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

    Joined:
    Aug 19, 2010
    #1
    Hi!
    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:
    http://developer.apple.com/safari/li...WebContent.pdf
    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

    Joined:
    Jun 22, 2010
    Location:
    @
  3. ahdrage thread starter macrumors newbie

    Joined:
    Aug 19, 2010
    #3
    Thanks.
    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 www.apple.com?


    Thanks for your help
     
  4. ahdrage thread starter macrumors newbie

    Joined:
    Aug 19, 2010
    #5
    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