This article accompanies this sample form. Please read the following and test the sample form. Either save a copy of the sample form in your Google Drive or download as an Excel workbook.
Aside from GPS coordinates being analytically valuable in research, they can be invaluable as a data verification measure in longitudinal studies. Collecting GPS coordinates in a geopoint field in SurveyCTO is just the start of what is possible.
In this tips and tricks article, I’ll show you how you can launch Google Maps using an HTML link on an Android device using SurveyCTO Collect, to get directions to pre-loaded GPS coordinates. This could be especially useful if you are planning a midline or endline survey and you are wondering how your survey team will find each location that was visited during your baseline survey.
Firstly, it is important to note that as of writing this, Google Maps on Android requires an internet connection to be launched and find a location or directions to that location, when using this HTML link approach. The ability to launch Google Maps and get directions to a location will still prove invaluable when it is available. When an internet connection is not available, there is a workaround, involving copying a set of coordinates from a text field which is populated using a calculation to provide a default value. These coordinates can then be pasted into Google Maps, which will provide driving directions, even when offline. This workaround is illustrated in the enumerator instructions in the accompanying sample form for this article. Also, conventional methods of locating an address can also be a fallback position.
Being able to launch Google Maps from a SurveyCTO form is facilitated by SurveyCTO’s HTML label support. Through including a clickable HTML link in a field’s label, you can call out to Google Maps on your device, to launch it, opening with directions to a location the user needs to find. GPS coordinates associated with each location can be pulled from attached pre-load data into the form using the pulldata() function in a calculate field. Those coordinates can then be concatenated (using the concat() function) to a partial URL to create a full, valid URL that opens Google Maps.
Implementing this solution
Review these instructions while viewing this sample form. The following steps apply:
1.) Prepare your GPS coordinates. Google Maps will accept coordinates in decimal degrees which is the same format that SurveyCTO will generate them in. The format should be “latitude longitude” (with a space in between, without the quotation marks). So either process your coordinates exactly like this and pre-load one value, or pre-load separate values and concatenate them togethe
2 Comments