Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2014
    Posts
    19
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Converting DMS to latitude and longitude

    Pref in jQuery how do you convert the following DMS format to latitude and longitude (decimal degrees) for passing onto Google Maps? (It seems cellphone companies do not have a uniform standard.)

    e.g.,

    Code:
    Longitude	W119.1234
    Latitude	N36.1234

    To, note, I do have the standardized format working (but the above format I am not at all familiar to me), e.g:

    Code:
    Longitude	119 33 12.345W
    Latitude	036 34 12.345N

  2. #2
    New Coder
    Join Date
    Oct 2014
    Posts
    19
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Omg, I think that other format already is in decimal degrees, I just ran it and it seems to be a valid locality. They just added cardinal directions to it. So I just need to test the first character or is number it, if the other test fails and strip off the decimal part and run it as a degree and i have my lat and long.


 

Tags for this Thread

Posting Permissions

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