When a user manually enters lat/lon coordinates, at the moment they need to enter "decimal" values like
-38.032997, 145.303297
when the more natural system (for lat/lon aware users, like pilots) would be
38° 1' 58.7892" S, 145° 18' 11.8692" E
In fact this latter format is actually used to display coordinates. Please add support for parsing the lat/lon entered from this (and similar) formats.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | gmap_patch_locpicker.txt | 2.62 KB | SebCorbin |
| #2 | latlonparse.test | 1.74 KB | lyricnz |
| #1 | location-parse-dms.patch | 3.34 KB | lyricnz |
Comments
Comment #1
lyricnz commentedHere's a patch that adds support for three different formats to Location lat/lon entry:
Comment #2
lyricnz commentedAnd a bit of simpletest that exercises the main function in previous patch.
Comment #3
SebCorbin commentedThis should be tested using location picker from gmap module also. (currently breaking the thing)
Comment #4
lyricnz commentedKindof uninterested in testing, given that this patch has been languishing with no comments for 5 months.
Comment #5
lyricnz commentedWhat problem did you experience with gmap location picker? I just tested latest -dev of location and gmap, and it worked fine.
Comment #6
SebCorbin commentedWith latest stable version of both of the modules I got a javascript problem, it tries to insert the d/m/s lat/lon into the marker values. Indeed it's not working and I got a "NaN" in my field after losing focus.
I did a overriding javascript file to passby this error and convert with a regex a degrees minutes seconds to decimal while losing focus, attaching it...
Comment #7
yesct commentedAlkaaran: can you post a step by step with how to replicate your issue (try it on a blank test site and post the steps you do)
lyricnz: thanks for taking another look, even though the issue is old. There have been recent commits in location, so all hope is not lost! activity in the issue queue could pick up.
Comment #8
lyricnz commentedAlkaaran: this patch will be applied to -dev codebase, so you should test with -dev. (neither Location or Gmap modules have had a release in 16 months - a lot has changed since then).
Comment #9
dwhutton commentedI am experiencing this same problem in trying to get Gmap / Location to accept coordinates in other formats.
I'm using Gmap 6.x-1.1 and Location 6.x-3.1
I've already patched location.module using the patch provided in post #1, but still get 'NaN' in the coordinates box when trying to enter non-decimal coordinates.
I don't know how to apply the lockpicker patch provided in post #6. Can anyone point me in the right direction?
Comment #10
legolasboClosing old D6 issues as D6 is end of life