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:
Geofield DMS input without seconds field
Geofield DMS input with seconds field

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.

Issue fork geofield-2169409

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

geodaniel’s picture

Issue summary: View changes
geodaniel’s picture

Adding screenshots

jantoine’s picture

FileSize
20.04 KB

Rerolled the initial patch cleaning up some coding standards issues, fixed some PHP warnings and updated the element process and validation functions a bit.

jantoine’s picture

FileSize
20.07 KB

This latest patch fixes warnings in PHP 7.1 due to http://php.net/manual/fr/migration71.other-changes.php.

jantoine’s picture

FileSize
20.04 KB

Updated patch file with php 8 fix from pull request in #5.