Tap Forms – Organizer Database App for Mac, iPhone, and iPad › Forums › Using Tap Forms › Location Field Editing
- This topic has 1 reply, 2 voices, and was last updated 6 years, 2 months ago by Brendan.
-
AuthorPosts
-
October 6, 2018 at 6:53 PM #30931
Kenneth JamesParticipantLocation Field Editing
I use Tap Forms as a logging device to capture events that have date/time and location components. There is a problem with Apple Maps (and presumably with Google Maps as well) that it does not identify the correct address with the GPS coordinates. As an example, an event logged at my home places the address of my home over on the next block with a totally erroneous street address. Unless you have some secret mechanisms with Apple APIs to tweak this, I have found no other way. Locations are always wrong in any app that I use that captures location data.
So my question is about how to edit these erroneous addresses. Can you share what the internal structure of the Location field is. At a minimum there seems to be the text component that holds the found address. Then there are one or two fields to old the longitude and latitude as single data points, or as one data point.
Can these internal Location field structures be edited by either a calculation field or a script field? And if so, how.
Ideally, I would like to establish the coordinates of a GPS rectangle that surrounds my house at a reasonable distance. Then test the GPS coordinates populated in the Location Field. If these coordinates are within this pre-established rectangle, then reset the captured GPS coordinates to the one, and only, GPS coordinate for the center of my house. Then change the address portion of the field to the correct address of my house.
Is this possible within Tap Forms? Or does it involve exporting the database to Excel or some other tool and doing the edits there?
Thank you for your counsel.
Kenneth James
October 6, 2018 at 10:40 PM #30936
BrendanKeymasterHi Kenneth,
Which version do you have? You can do this on the Mac version by clicking the location button on the field in the record and then changing the coordinates in the field there. Plus you can edit the name itself on the record details view.
I suspect you could do it with a script as well.
The structure of the Location field value is a dictionary that looks like this:
{ altitude = "2674953.657398775"; heading = "-0"; lat = "50.337885"; lon = "-115.853054"; pitch = 0; title = "4992 Falcon Dr, East Kootenay F BC V0B 1L1, Canada"; }
Not all values are required. The heading, altitude, and pitch values are just for supporting the 3D map view on the Mac version.
So ya, if you can generate a dictionary of values like the above, you could probably use it with the
record.setFieldValue(fld_id, value);
function.Thanks!
Brendan
-
AuthorPosts
You must be logged in to reply to this topic.