facebook

Obtaining Latitude and Logitude as Seperate Variables?

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #332248 Reply

    Unknown Author
    Participant

    How does one grab the geolocation latitude and longitude as seperate variables?

    For example, I want to get the geolocation, subtract 0.006 degrees from the longitude, then mark that position. I don’t know how to parse/separate the geolocation LatLong data into seperate numbers.

    -1TC

    #332251

    Unknown Author
    Participant

    By brute force trial and error, this seems to work:

    
    var temp=mapPos.lat();
    var temp2=mapPos.lng();
    

    -1TC

    #332269

    @1thinchip,

    Looks like you answered your own question. For other viewers of this thread here is the api for the latlng object:
    https://developers.google.com/maps/documentation/javascript/reference#LatLng

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Obtaining Latitude and Logitude as Seperate Variables?

You must be logged in to post in the forum log in