With GoCanvas, you can capture GPS coordinates in your form using your mobile device.
Adding a GPS Field to Your App
First you have to add a field to your App in the App Builder.
1. Launch the App Builder.
2. Click and drag a GPS field from the Field Palette into your application. You can learn more about adding fields here.
GPS Field Options
When adding the GPS field to your app, there are a few options which can be customized. After you've added your field, click onto the field to open the Field Settings.
You can specify how the location coordinates will be displayed when viewing the submission online or in a PDF. The options are:
- Small Map - This display fits in the right hand column. When clicked, this map jumps to Google Maps.
- Large Map - This shows a map about the width of the page. This map will also jump to Google Maps when clicked.
- Lat/Long - This displays only the raw latitude and longitude coordinates.
- Map Link - Like the Lat/Long, this displays the raw coordinates but also links to Google Maps.
Map Zoom Option
When a map is displayed within the browser or in PDF form, this field specifies how zoomed in the map will be on the captured location
GPS Capture on Mobile
On the mobile device, GPS control is seen as a button. The user clicks it to capture their location.
The screenshot below shows an example of what the button looks like when running on an iOS device before and after the location is captured.
You can preview the GPS capture on a map by clicking on the captured coordinates.
You can set a GPS field to be "hidden" From the App Builder. This allows the field to collect GPS data without displaying to the user. Learn more about hidden GPS.
GPS Display on your PDF
Once GPS location has been captured and uploaded, it can be seen in two different ways, based on the field settings chosen above:
- raw coordinates of the location.
- a point on an embedded map.
This image will link to Google Maps for the captured location.
Below is a screenshot of an embedded map on the Standard PDF.
Advanced GPS Properties
In your App Builder Field Settings, expand More Field Settings to customize these properties.
Accuracy (m) Option
Accuracy (m) allows you to specify how accurate the GPS location must be in meters for the location. When acquiring a location from satellites, the first points reported by the hardware can often be inaccurate.
By choosing a focus on accuracy, GoCanvas will reject any reported location coordinates until the desired accuracy is met or until the timeout expires.
Timeout (ms) Option
Timeout (ms) allows you to decide the maximum amount of time, in milliseconds, to wait for location coordinates. If it takes to long, and accuracy hasn't been met, the location will be reported.
You can change this by turning on the force accuracy option (see below).
Force Accuracy Option
If you choose Force Accuracy, if the mobile app doesn't get the accurate location before timing out, no location will be captured.