I've put together another input widget for Geofield that allows latitude and longitude values to be entered into separate fields for Degrees, Minutes and Seconds (DMS). Is this something that could be a useful addition to the module?
Example inputs:
It allows the Seconds field to be disabled optionally, and also provides a Degrees Minutes formatter which hides the separate Seconds value, incorporating them into the Minutes as a decimal value.
The patch also allows the coordinates 0,0 to be used for both the existing lat/lon input widget and for the new DMS lat/lon input widget.
Note also the separate, related issue (#2142071: Allowing coordinate entry in degrees-minutes-seconds DMS format) for being able to enter DMS coordinates into the standard lat/lon widget, which doesn't seem to work at the moment.
Comment | File | Size | Author |
---|---|---|---|
#6 | 2169409-6.patch | 20.04 KB | jantoine |
#4 | geofield-dms-widget-2169409-4.patch | 20.07 KB | jantoine |
Issue fork geofield-2169409
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
geodaniel CreditAttribution: geodaniel commentedComment #2
geodaniel CreditAttribution: geodaniel commentedAdding screenshots
Comment #3
jantoine CreditAttribution: jantoine as a volunteer commentedRerolled the initial patch cleaning up some coding standards issues, fixed some PHP warnings and updated the element process and validation functions a bit.
Comment #4
jantoine CreditAttribution: jantoine as a volunteer commentedThis latest patch fixes warnings in PHP 7.1 due to http://php.net/manual/fr/migration71.other-changes.php.
Comment #6
jantoine CreditAttribution: jantoine as a volunteer commentedUpdated patch file with php 8 fix from pull request in #5.