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.
- In arcgis.com, open your Hiking Conditions map from the previous section of the lesson.
- In the upper left of your map, click Home > Content.
- Click Add Item > From My Computer.
- 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.
- Complete the Item from my computer dialog box, being sure to check the box to Publish this file as a hosted layer, and click Add Item. (Note that the title of your new feature layer must be unique with the Penn State ArcGIS Online organization, so you'll want to customize the name to be something like, "trail_issues_baxterGeog865."
- When your service has finished publishing, examine the overview page that appears for your new trail_issues service.
- Click the Settings tab, and note that you can control editing and export functionality on this service.
- Click the Share button on the Overview page, 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).
- At the bottom of the Overview page, notice the Service URL. Clicking the View button 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 (i.e., 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.
- 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...)
- Remember to specify your customized "trail_issues" service title.
- Return to your Hiking Conditions web map, and click Add > Add Layer From Web.
- 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.
- In the Contents list on the left, hover your mouse over the trail issues service name and click the Change Style icon.
- In the Choose an attribute to show dropdown, choose Resolved.
- In the Select a drawing style section, click Types (Unique symbols), and click the Options button.
- 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. Save your changes.
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.
- Hover your mouse over your wonderland layer name, click …, and Remove Pop-up.
- Now hover your mouse over the name of your trail issues layer, click …, and click Configure Pop-up.
- In the Configure Pop-up dialog that appears, change the pop-up title to Trail Issues.
- Click Configure Attributes.
- Uncheck the Id attribute, and click OK. The ID is occasionally interesting to GIS analysts, but probably no one else.
- 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.
- 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.
- When your web map looks awesome, go ahead and save it.