GEOG 865
Cloud and Server GIS

Publishing your data as a hosted service on ArcGIS Online

PrintPrint

When you saved your map in the previous section of the lesson, your trail features got saved with it. If you want your uploaded dataset to be accessible outside the map as a service to anyone who uses your ArcGIS Online organization, or the public in general, you must publish it separately as a “hosted feature service”. Let’s do that with a different shapefile.

Switch your mentality now to that of a park ranger who wants to share information with co-workers deployed in other stations around the park. You have a point dataset representing maintenance issues reported on the trail. You want your colleagues to be able to load this whenever they’re logged in to your organization.

  1. In arcgis.com, open your Hiking Conditions map from the previous section of the lesson.
  2. In the upper left of your map, click Home > Content.
  3. Click Add Item > From My Computer.
  4. Click Browse and select the trail_issues.zip file included with this lesson’s data. This is a zipped point shapefile with a few points in it.
  5. Complete the Item from my computer dialog box as shown below and click Add Item.

  6. Adding an item to ArcGIS Online from your computer
    Figure 7.4: Adding an item to ArcGIS Online from your computer
  7. When your service has finished publishing, examine the item details page that appears for your new trail_issues service.
  8. Click the Settings tab and note that you can control editing and export functionality on this service.
  9. Click the Share button and note that you can open access to the public or just people within your ArcGIS Online organization. Check the box for the organization, but not for the public (we don’t want the public to stumble across this practice service and think there are real issues on the trail).
  10. Click the Overview tab and click the Service URL link. This will open the Services Directory page for your service where you can see that it is a bona fide feature service like the ones you’ve worked with elsewhere in this course. The URL has a token appended to it that shows you have entered the requisite ArcGIS Online credentials for viewing this service (ie, you are logged in to your account).

    Think about security for a minute. There are a variety of situations where you’d want to make this service public, and other situations where you’d only want it visible within your organization. If you make this service private to your organization, it won’t be visible in any web map that you share with the public.

    In some cases you might want to make the service publicly visible, but only allow internal people to edit it. Esri provides for this with something called feature layer views.
    Let’s move ahead now and add this service to our web map.
     
  11. Copy the URL up to and including the FeatureService part (so that it looks something like https://services8.arcgis.com/ju9hg9bDFqOUZxHa/arcgis/rest/services/trail...)
  12. Return to your Hiking Conditions web map and click Add > Add Layer From Web.
  13. Choose An ArcGIS Server Web Service and paste the URL to your trail_issues feature service.
    Your trail_issues layer should appear symbolized by the default dots. Let’s symbolize it based on whether the issue has been resolved or not.
  14. In the Contents list on the left, hover your mouse over the trail issues service name and click the Change Style icon.

  15. Change Style icon
  16. In the Choose an attribute to show dropdown, choose Resolved.
  17. In the Select a drawing style section, click Types (Unique symbols) and click the Options button.
  18. Click the symbols for No and Yes and style them with large icons that would make it easy to tell whether an issue has been resolved or not.

    Symbolizing trail issues by Resolved status
    Figure 7.5: Symbolizing trail issues by Resolved status
    Finally, let’s configure some pop-ups so that we can get a description of the issue by clicking on it. First we want to remove the default pop-up for the trail polyline itself so that it doesn’t get in the way.
     
  19. Hover your mouse over your wonderland layer name, click and Remove Pop-up.
  20. Now hover your mouse over the name of your trail issues layer, click , and click Configure Pop-up.
  21. In the Configure Pop-up dialog that appears, change the pop-up title to Trail Issues.
  22. Click Configure Attributes.
  23. Uncheck the Id attribute and click OK. The ID is occasionally interesting to GIS analysts, but probably no one else.
  24. Click OK to dismiss the Configure Pop-up dialogs and then click an incident on the map to test your pop-ups. Keep fiddling with your pop-up configuration until you're happy with how it looks.

  25. Testing pop-ups
    Figure 7.6: Symbolizing trail issues by Resolved status
  26. In the Contents list, rename all your layers to have user-friendly names. For example, instead of a long name about TIGERweb, just name the layer Glaciers. You might have other layers titled Snow Analysis, Wonderland Trail, Trail Issues, etc.
  27. When your web map looks awesome, go ahead and save it.