I think there is a fairly major bug in the DMS converter, major though I presume that my use case must represent a bit of an eedge case sicne no-one else seems to have run across it? I am allowing users to enter lat/lon in DMS (something I've never had to do before surprisingly). When entering a "-" in front of the longitude the geofield_latlon_DMStoDEC breaks, because it uses a simple arithmetical. The proposed patch adapts for this. Now, maybe in the world of DMS, one never-ever-ever uses a minus/plus sign, instead opting for N/S/E/W - but anyhow, since the FCC's web site conversion app handles this form of input, I consider it to be a reasonable case: http://www.fcc.gov/encyclopedia/degrees-minutes-seconds-tofrom-decimal-d...
Example:
Given geofield_latlon_DMStoDEC("-78 46 32") the output = "-77.224444444444" but the output should be "-78.775555555556" (I think??)
Comment | File | Size | Author |
---|---|---|---|
#1 | drupal-2432855-1.patch | 486 bytes | robertwb |
Comments
Comment #1
robertwb CreditAttribution: robertwb commented