GEOG 863:
Web Application Development for Geospatial Professionals

2.4 Applying finishing touches


2.4 Applying finishing touches

Tools like those built into Field Maps often set UI element properties to commonly used values in order to minimize the effort needed to produce a working app.  However, just as a cartographer shouldn't leave .shp in the names of layers being shown in a legend, a developer should consider what changes can be made in default settings to produce a more professional and user-friendly UI.  

If you haven't already, take a few moments to examine how the ISMP Web Map looks when open in Field Maps on your mobile device.  Are there any fields being shown that would not be of interest to the end user? Are there any control labels that could be better tailored to the map's purpose or made more user friendly?  Are the dropdown options presented in an intuitive order?  On this page of the lesson we'll address the issues that I noted.  If you think there are any other ways to improve the map, feel free to post your ideas to the discussion forum.

The first thing we'll do is look for fields in the HMZ form that aren't needed and only serve to clutter it.  Looking at the map in the Field Maps app on your mobile device, the OBJECTID, GlobalID, Shape_Area, and Shape_Length fields offer little, if any, value, so let's get rid of them.  But how?  We have a few different options:

  • Open the map in the AGO Field Maps form designer and remove the unneeded fields from the HMZ layer's form.  This would cause the fields to no longer appear in Field Maps, but they would still appear in other contexts where the map is found. 
  • Open the map in the AGO Map Viewer and remove the unneeded fields from the HMZ layer's popup.  This would cause the fields to no longer appear anywhere the map is found.
  • Open the feature layer with the Map Viewer and remove the unneeded fields from the layer's popup.  This would cause the fields to no longer appear everywhere the ISMP Web Map is used and in any other maps that include the layer. 

All of a layer's fields are included in its popup by default.  Interestingly, if you open the map with the Field Maps form designer, you'll see that the fields I mentioned (OBJECTID, etc.) do not appear on the form.  Recall that we populated the form with controls by choosing to convert the layer's popup.  The fields I mentioned aren't on the form and also aren't available to add.  And yet, they do show up when the map is opened in the Field Maps mobile app.  I don't know if this is an intentional design decision or a bug.  In any case, to get these fields off the form, it means we'll need to modify the layer's popup.  

  1. Open the ISMP Web Map in the AGO Map Viewer.
  2. The HMZ layer should be selected by default.  Click the Pop-ups button found on the strip of buttons running along the right side of the map.  A popup preview showing data from an example feature should appear over the map along with a panel of properties that can be set.
  3. Click on the Fields List button to expand the list.  
  4. Click the X next to the OBJECTID field.  You should see it disappear from the popup preview.
  5. Repeat for the GlobalID, Shape_Area, and Shape_Length fields.  
  6. Close the Pop-ups panel. 

    The Save and open button running along the left of the Map Viewer (folder icon) should now have a blue dot over it, indicating that there are unsaved changes.
  7. Click that button, then Save.

    There are likewise a few unneeded fields that appear on the Species HMZ form -- OBJECTID, GlobalID, and HMZ_GUID.  
  8. Click the Tables button on the left side of the Map Viewer to access the tables included in the map.
  9. Select the Species HMZ table, then go through the same process used above to remove the three unneeded fields from the popup.
  10. Save your changes.

    One thing you may not have noticed when configuring the forms in Field Maps is that the controls were all embedded within a Group layout element.  On each form, this element was assigned a default label of Control 1.  This label appears in the Field Maps mobile app, but interestingly, only for the Species HMZ form, not for the HMZ form.  (The group label for the HMZ form is Fields, not Control 1, for whatever reason.)  The mobile app user can tap this label to expand/collapse the field controls found within that group.  
  11. Exit out of the Map Viewer and open the ISMP Web Map in Field Maps again.
  12. Open the Species HMZ form and select the Group control (the item on the design canvas with the label Control 1).
  13. In the Properties panel to the right, change the Display Name to Species-HMZ Attributes.
  14. Click the Save button in the upper right of the design canvas to commit your change.

    One last improvement that we'll make concerns the selection of the species.  The Common_Name dropdown list, which is populated based on the SpeciesNames domain you applied in Pro prior to publishing the web layer, is not in alphabetical order, making it quite tedious to find the desired species.  There doesn't appear to be a convenient way in AGO to order the names.  It can be done using the Python API for ArcGIS, but diving into that coding platform would be outside the scope of this class.  Fortunately, there is a tool in Pro built for this purpose.  And most importantly, making such a change won't require going through the entire workflow again.  We can simply re-publish the web layer, choosing to overwrite it, and the change will be reflected in our web map (and any other web maps that happen to include the web layer).
  15. Return to ArcGIS Pro and open the geoprocessing toolbox (Analysis > Tools).  
  16. Searching on the keyword sort, locate and open the Sort Coded Value Domain tool.
  17. Browse to your ismp geodatabase, selecting the SpeciesNames domain, and Run the tool so that the Code-Description pairs are sorted by Code in Ascending order.
  18. Re-publish the web layer by going to Share > Web Layer > Overwrite Web Layer.  
  19. Looking within Portal > My Content, navigate into your fieldmaps folder and select your ISMP Web Layer.  

    A message will appear, warning that what you're about to do will cause you to lose changes that were made after the layer was initially published.  This means losing the features/records that were added to the HMZ layer and the Species_HMZ table.  This isn't really problematic as those were just test edits.  Perhaps more consequential is the possibility of losing changes made in popup configuration.  We just made changes of that kind, though recall that we made them by opening the ISMP Web Map in the Map Viewer rather than the ISMP Web Layer. That meant that we were taking the popup settings the web layer brought with it and overriding them within the current web map only.  It also means that the changes we made should "survive" an overwrite of the web layer.
  20. You could click Cancel to back out of the overwrite now if you wanted, but go ahead and click OK.
  21. In the Overwrite Web Layer panel that appears, accept all of the default settings and click Publish
  22. Go back to the Field Maps mobile app, reload the map, and test again.  Confirm that the Common_Name dropdown list is now sorted and that the unwanted fields are not being shown.  (You should expect any data edits you had made in earlier testing to have been lost.)  

WIth that, we've finished our walkthrough of configuring a field data collection app.  In the next section, you'll be prompted to take what you've learned and apply it to a different scenario.