Skip to main content

Working with Hosted Feature Layer Views in ArcGIS Online

Have you ever wanted to maintain multiple copies of the same layer without having to republish it? If so, hosted feature layer views are an excellent solution. Hosted feature layer views allow you to maintain one primary hosted feature service on the back end, along with different copies (views) which can each have different display and permission settings.

Maintaining multiple copies of the same data has its drawbacks. It is time consuming to strip/republish the same data multiple times. Data integrity may be compromised when, for instance, a new feature is added on one layer but not the other. It will also consume more credits to have the same features duplicated in multiple hosted feature services.  With a view, only one hosted feature service will consume storage credits and all edits on any version will point back to a central service, so there is no potential for features to go missing in some copies. Each copy can maintain independent symbology, filtering and permission settings, so you can make sure that users only see what you want them to.

How do you create a view?

A view can be created from the item details page of a hosted feature service by selecting the ‘Create View Layer’ button.

Each view can then have separately configured settings and layer properties.

The Settings tab allows you to configure what kind of access the user has to the layer. You can enable/disable the ability to edit the layer (add, remove, update features), whether the layer can be exported, taken offline and synced and so forth.

The Visualization tab allows you to configure the layer display properties, including symbology, labels, filters, pop-up configurations and more. Anytime this view layer is added to a new map, it will default to these display settings.

Use Case – Layer Permissions

A municipality maintains hosted feature layers representing the city's infrastructure. They have a set of water utilities layers, including hydrants, valves, water mains and laterals.

Municipal employees need editing permissions to add new data about water features. The city would like to share a simplified copy of this layer to the public so that they can see the water utility lines running through their home, but do not want the public to be able to make edits to the layer. There are also many fields in this layer that must remain confidential, such as the maintenance inspection information, that cannot be shared to the public.

One strategy would be to go into ArcGIS Desktop, make a copy of the feature class, delete all the confidential fields and republish a second service for public consumption. The drawback to this workflow is that these two water utility layers would not be linked – updates from one layer will not be reflected in the other. This could prove troublesome for maintaining data integrity, as one layer may have features that the other does not. Although this could be remedied with an automated script to sync the two layers at a regular interval, it is a complex and potentially time-consuming workflow. Further, maintaining two copies of the layer would consume double the credits.

Alternatively, the municipality could create a hosted feature layer view. This view would have these confidential fields hidden and could be shared to the public. The view would also have editing disabled. The view will remain up to date, as it will reference the source hosted feature layer directly. The original hosted feature service would still contain the full set of fields, and be only accessible privately, within the organization.

As you can see in the image below, the hosted feature layer (left) has editing enabled, so that this layer can be modified by municipal employees. Whereas the view layer (right) has editing disabled, so that the public cannot modify the underlying data.

Use Case – Layer Display

A mining company maintains a hosted feature layer to collect information about the lithology of the land. Each polygon includes detailed information about the units, era, stratum and rock type. They are using the Collector for ArcGIS mobile app on their iPads to collect data in the field. They want to have multiple copies of this layer in the same map to display different lithology features (one copy to show the rock type and one copy to show the age).

Can they just add the same lithology layer twice to their web map? Yes and no…Although this may work in some scenarios, it could pose problems down the road. For instance, if they want to use these layers in a different map later, they must re-configure the symbology and other layer properties for each new map. Additionally, if they wish to take their map offline on the Collector app to collect data outside of cell phone service, it will not sync properly with two copies of the same layer in the map.

Instead, a hosted feature layer view can be used to maintain these two copies. Each view could have different layer properties configured in the Visualization tab, so that a user can simply add the view to a new web map with the rock age field symbolized by default. Likewise, another view could automatically be symbolized by the rock type and include a filter to only show the polygon features that lie in their work area, rather than loading the whole country. The pop-ups can also be uniquely configured to only show the fields relevant to that subject (see below).

By leveraging hosted feature layer views in your ArcGIS Online project, you can speed up your workflows by using the same layers for a variety of different purposes, including different display settings and editing permissions. Ready to give it a try? See the Esri documentation for more details on creating your own view today and to see additional examples of working with views.

About the Author

Shannon Cox is a Desktop Support Analyst on the Esri Canada Desktop Support team. She has over six years of experience with Esri software. Shannon is a graduate of Trent University and the British Columbia of Institute of Technology with a Bachelor of Science (Honours) in Physical Geography and an Advanced Diploma in GIS, respectively. Prior to Esri Canada, Shannon’s experience included GIS applications in the field of physical geography (mapping glaciation, modelling hydrology networks), addressing (manual geocoding), road network editing, and air photo georeferencing. In her spare time, Shannon enjoys working on digital volunteer mapping during international emergencies, doing yoga, meditating, reading, and drinking local craft beer.

Profile Photo of Shannon Cox