Assignment 5
Use mobile GIS to edit a layer through a web service
Create an app that can be used on mobile devices to update a dataset through a web service. The dataset will be hosted with ArcGIS Online, and mobile devices will be able to add new records or update existing records. There will be two layers to accomplish this (pretend you are setting this up for an organization): one for private use within your organization and one for public use as a volunteered geographic information (VGI) app.
The example used in this tutorial is for an app to report debris on campus following a tornado. In this example scenario, campus authorities need to quickly deploy a system for identifying debris so maintenance crews can respond. The system is initially set up so that only these crews can make detailed reports, but given the urgency of the situation, a public app is also created to get basic input from anyone on campus who spots downed trees, damaged vehicles, etc.
We will use separate apps to update the private and public layers:
- For the private layer, you will use Collector for ArcGIS (iOS, Android, Windows) for internal reports.
- For the public layer, you will create a web app in ArcGIS Online for public, crowdsourced reports.
Table of Contents
Data
The dataset will at first be empty, and will only be populated once users start submitting reports through the private and public apps. To create this empty dataset, use the feature layer templates available in ArcGIS Online. This tutorial will use the “Debris Reports” template.
Feature layer templates will include predefined attributes. For example, the “Debris Reports” template will create a feature layer with the following attributes:
- Report ID
- Type of Debris
- Details
- Name
- Phone
- Estimated Volume (cubic yards)
- Estimated Weight (tons)
- Date Submitted
- Status
- Assigned To
- Photos and Files
Creating a new feature layer will create a new item on your Content page. This layer can be added to maps.
For public access, we will create a “view” of the feature layer.
The new layer “view” is not a copy of the source layer. The view points back to the source layer. Therefore, updates to the data in one layer will be reflected in both the view and the source. The purpose is to be able to set different permissions, styles, and filters for the view and the source. In this tutorial, the source will be private and the view will be public:
- Feature layer: employees can add, update, and delete reports; public cannot access.
- Feature layer view: public can access but can only add new reports.
Steps
The basic steps in this process are:
- Create an empty layer (for employees)
- Create a map (for employees)
- Set up ArcGIS Collector (for employees)
- Create a layer view (for public)
- Create a map (for public)
- Create an app (for public)
Notice the general pattern: Layer/service » Map » App.
Once again we see the nesting dolls, demonstrating that layers are published as web services, which are added to maps, which are added to apps.
Part 1: Create an empty layer
- Sign into your ArcGIS Online account, provided in class by your instructor.
- Go to your Content page.
- Click
New Item
>Feature Layer
. - Click
Use a template
,Next
, and search for the “Debris Reports” template. Select it and clickNext
until asked for a title and tags, then clickSave
. The layer will be created and you will see its Item Details page. - Click the
Data
tab at the top of the page to see the predefined attributes (there are no features under the attributes yet). - Click the
Visualize
tab to see the template’s predefined symbology. For the “Debris Reports” template, the symbols correspond to different types of debris (vegetation, hazardous material, etc.). The map should be blank except for the basemap. - Click
Settings
, and in theFeature Layer (hosted)
part of the settings, make sure theEnable editing
box is checked. ClickSave
.
Part 2: Create a web map
- Still on the Item Details page of the new feature layer, click the
Overview
tab, then clickOpen in Map Viewer Classic
to add the layer to a new map. - In the Map Viewer, the empty layer should appear in the
Content
pane with symbols already. - Pan and zoom the map to your area of interest, such as the campus of LSU.
Save
the map and name it with “Private” at the end of the name to distinguish it from the public layer we will make later. Do not share withEveryone
, because this map contains the private layer for our pretend organization’s internal use.
Part 3: Set up ArcGIS Collector
- On a mobile device (iOS, Android, Windows), install Collector for ArcGIS (Esri) from your device’s app store.
- Once installed, sign into Collector with your ArcGIS Online account.
- Browse for
Maps
in Collector to see the maps saved in your account that have an editable feature layer added. Tap your debris report map to open. - Depending on your version of Collector, tap
Collect
,Capture
, or+
to add a new feature to the layer. Collector will try to use your current location, but you can tap the map to drop a point marker instead. - Fill out some basic attributes and attach an image. Tap
Submit
. - The new feature will appear on your map. You can refresh the map on your computer to see the feature you just input from your phone.
Part 4: Create a View Layer for public access
- Return to the layer’s Item Details page.
- Click
Create View Layer
.
Item Details page showing the Create View Layer button. - On the Create View Layer page, click
Next
at theChoose layers
step. - On the
Define view
step, click your layer to see options, then clickArea of interest
. Pan and zoom the map to the area where debris could be reported, then draw a box around the area. - Click the back arrow by
Layer definitions
and thenNext
. - Put “view” at the end of the title to distinguish this view layer from the original, then click
Create
. - Note that this creates another item in your Content:
Content page showing a separate item for a feature layer view. - Go to the view layer’s Item Details page and click
Settings
. - Check
Approve this layer to be shared with the public when editing is enabled
andSave
, thenEnable editing
andSave
. Note that there are several options underEnable editing
. You will configure these on your own in the “Try it” section next.
Try it
- Think about how you want your public app to be used and set the appropriate editing permissions on the View Layer from Part 4.
- Should the public be able to only add new features?
- Only update existing features?
- Other combinations of permissions?
- Add the View Layer to a new map. Set appropriate sharing permissions on the map, considering it will be used in a crowdsourcing app.
- Add the map to an app. Set the same sharing permissions.
- Choose a configurable app meant for collecting and editing data, such as the “GeoForm” template. When setting up the app, consider which form fields need to be available for public input, e.g., you can hide the “volume” field as it is not realistic to expect people to know that.
-
Fill out the item information on the Item Details page of your public app. Describe what the app is for and how the audience is supposed to use it.
A progress bar indicates how much information has been filled out on the Item Details page. - Once finished with the exercise, your Content page should show something like this:
Content page with items for private and public layers, private and public maps, a public app, and any supporting files you uploaded.
We have public and private layers, public and private maps, but only a public app, because ArcGIS Collector serves as our private app.
Submit
- The URL to the Item Details page of your public web app. Example:
https://www.arcgis.com/home/item.html?id=ABC123
orhttps://arcg.is/ABC123