Connecting ActivityInfo with ArcGIS Online
ActivityInfo's mobile app is a great tool for collecting geo-located information, whether for needs assessments, facility surveys, damage reports, or many other kinds of relevant data.
While ActivityInfo makes it easy to visualize this data using its built-in mapping reports, there may come a time when you need to connect this data to a fully-featured GIS solution, like ESRI's ArcGIS Online.
ArcGIS Online is a web-based Geographic Information System (GIS). They offer a 21-day free trial.
In this tutorial, we'll look how you can add an ActivityInfo form as a layer in an ArcGIS Online. To do this, we'll use ActivityInfo's GeoJSON API.
For this tutorial, we'll use the IDP Response template. You can create your own copy to work with.
Finding the GeoJSON link
The easiest way to get the GeoJSON is to use ActivityInfo's user interface. Navigate to the form you'd like to include as a layer in ArcGIS. The form must have a Geographic Point field, or a reference to another form that does.
In the screenshot below, you can see the "Map" button is visible in the toolbar, which means that this form has, or is related to, a geographic location.
From the Export menu, select "Export via the API", and then select "Query all field as GeoJSON".
This will display a URL that you can copy to the clipboard.
Selecting the geometry
The GeoJSON format only supports one point per feature. Your form may have more than one Geographic Point field, or reference more than one form that has a geographic location. By default, the export menu will show the URL for the first Geographic Point field. You can change this by switching to the map view of the form, and then select the geography source:
The GeoJSON link in the Export menu will reflect your selection.
Adding the layer to ArcGIS Online
You can add data from ActivityInfo to an ArcGIS Online map using the same GeoJSON link that we used for QGIS. Click the button with the "+" icon on the left-hand side and then select "GeoJSON"
Then paste your GeoJSON link into the URL textbox:
If you see a "Service error" alert, you probably need to provide an ActivityInfo API Token to authenticate to the ActivityInfo server. that you are allowed to access this data.
ArcGIS online unfortunately doesn't have any built-in tools for managing credentials, so we will have to add the API token as a query parameter.
Click the "Add parameter" button in the "Custom parameters" section. Type "token" into the "Parameter" textbox, and paste an ActivityInfo API token in the "Value" textbox. Read more about generating an API token.
Be sure to generate a read-only token, and be careful with whom you share this map since they will also have access to your API token.
You can use the following URL from a public form to test the connection, without needing to provide authentication:
Finally, click "Add to map", and you'll see the points appear on top of your base map.