Closed (fixed)
Project:
Geolocation Field
Version:
8.x-1.5
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Jul 2016 at 11:21 UTC
Updated:
15 Sep 2016 at 09:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
christianadamski commentedHey VBN,
do you want a new way to INPUT geolocations (field widget) or to OUTPUT (field formatter) them. And how exactly would that have to look like? Writing either of these is probably not very hard, but I would need a very precise definition what needs to happen.
Comment #3
VBN commentedWell, input is the most important.
For this moment is only digital degrees:
In this format 123.456789, 78.945612.
But i want to let users input also degrees, minutes seconds notation like this:
123° 27' 24.4404" , 78° 56' 44.2032"
So both possible INPUT methods would be nice, but automatically detected.
This is calculated this way:
OR reversed:
If you can output them in both notations, that would be a great bonus.
To use in a view, you could easily add another geolocation GPS field to display a different notation.
But again, the input method is the most important.
Comment #4
VBN commentedIt would not really change the way it's used because actually, both inputs would display the same result.

Comment #5
christianadamski commentedOk. So:
- update GeolocationLatlngWidget.php to accept GPS format as well
Either
- add GPS formatter for output
- add GPS views field
or
- Add LatLngFormatter option to display GPS instead
- Add GeolocationField views field handler option to display GPS instead
Update/Add
- GeolocationFieldTest
- GeolocationItem
accordingly.
Comment #6
christianadamski commentedHere's an initial version.
- It allows adding values in sexagesimal notation. Essentially 2 digits followed by "°" and optionally the rest.
- The sexagesimal notation will be shown in the widget description as well.
- added a field formatter displaying the sexagesimal notation
- views can use that formatter in the field display
Missing:
- a test
- testing by users
Comment #7
VBN commentedI'll go testing this for you, give me a few days.
Comment #8
christianadamski commentedAnd here is the same patch again with a test added.
Test checks for correct input and transformation both ways. The formatter is not tested, but I think that's fine, as it is based on the former. Should we need to test that as well, it's pretty easy.
Comment #10
christianadamski commentedLet's see what the general audience thinks. Pushed.
Comment #11
derjochenmeyer commentedgreat! :)
Comment #13
VBN commentedWorking like a charm in 8.x-1.x-dev!
What a great feature