Skip To Content

Best practices for layer publishers

The layers you publish provide the building blocks that allow you and others to build maps and apps. Therefore, you need to consider what data to include in your layers, who needs access to the data you publish, and how those people will use the layers.

The following sections explain two main types of layers you create from spatial features, how their storage mechanisms affect how they're used, and how to control who can edit your feature data.

Understand when to publish tile or feature layers

The primary types of layers used in maps are tiles and feature layers. Each provides different functionality and has a different purpose.

Tiles support fast visualization of large datasets. If you need to draw a large number of complex features in a single layer, publish your data as a hosted tile layer. When published from a hosted feature layer, your hosted (raster) tile layer can reflect any changes made to the data in your feature layer. You can also enable pop-ups on the hosted tile layers to allow the users viewing your map to interact with the hosted tile layer. If pop-ups have been configured on the hosted feature layer used to publish a hosted tile layer, the hosted tile layer automatically has the same pop-up configuration.

If your data is updated frequently and the features require editing, publish your data as a hosted feature layer. Features expose the geometry, attributes, and symbol information for vector GIS features. They are useful when you need to expose data for display, query, and editing on the web. When published as a hosted feature layer, your data can be updated and edited as often as you need. Emergency management is a typical example of data that changes frequently. During an active event, emergency responders can communicate with the public by updating disaster boundaries, adding new shelter locations, and so on. Presenting this data as a hosted feature layer allows the responders and citizens to quickly see the latest emergency information.

Consider how to store your features

If you have a small amount of data and you will be the only editor, you can add the data directly to the map as a feature collection. Common file formats such as CSV, shapefiles, and GPX can be added to a map as feature collections. This is a fast and low-cost way to store and manage your data. For example, if you have a spreadsheet of regional offices, all you need to do is drag it onto the map. If you don't have data stored in a file, you can create your own data in Map Viewer by adding a map notes layer. Map notes are best when you only have a few features to add. Feature collections are saved in the map, and any changes you make are reflected in the map the next time it's opened.

If you decide to use shapefiles in Map Viewer, be aware that the shapefile must be less than 10 MB in size and have fewer than 4,000 point features or 2,000 line or polygon features to add it to Map Viewer. If the file is too large, you can generalize features to reduce the size of the shapefile and, therefore, improve web display. You can generalize the features using a desktop application such as ArcGIS Pro, or you can have Map Viewer perform the generalization when you add the file to your map. Generalizing reduces the precision of the shapefile layer to approximately 1 meter in Web Mercator and removes vertices within 10 meters in Web Mercator. This should maintain an informative and accurate display of your features while reducing the overall size of your data and allowing your layer to quickly display in the map.

Note:

Generalizing doesn't work well on coincident polygon features intended for large-scale display, because it creates some slivers in the polygons. For those layers, publish a hosted feature layer from the shapefile and use that layer in Map Viewer instead.

If your data requires multiple people to edit it, you should publish it as a hosted feature layer. An advantage of using ArcGIS Online is that you don't have to install any server software or administer additional resources. The layers (published as services) run in a cloud environment, administered by Esri, in which the server automatically scales up to meet demand. You can publish features using the website, ArcMap, or ArcGIS Pro. From ArcMap and ArcGIS Pro, you can also update and republish your data. From the website, if you published your hosted feature layer from a shapefile or file geodatabase (and sync is not enabled), you can overwrite the existing data in the layer and maintain the URL and layer properties. If these operations need to be performed frequently, you can automate the process via scripts. You can also create multiple views of your hosted feature layers. Hosted feature layer views allow you to control which fields and features are available to specific audiences without the need to duplicate your data.

Control who can update your features

If you want everyone who has access to the hosted feature layer to be able to update the data, enable editing and choose the type of edits you want others to make. For example, you can restrict editing to adding features only or updating existing features only. You can also allow everyone to add, update, and delete features. Be aware that if your hosted feature layer is shared publicly with editing enabled, the general public will be able to edit the data. If you have more complex editing needs, you can take advantage of hosted feature layer views to apply specific editing permissions for each audience. Hosted feature layer views are useful when, for example, you want your fieldworkers to have editing access to a layer, but you also want to share the layer publicly for people to view it or add observations. You can have multiple views into your data, each with its own set of editing capabilities, symbology, and filtering. This allows you to tailor each hosted feature layer view based on your needs.

As the owner of the features stored in the map, you can perform edits in Map Viewer using its included editing tools. When working with a hosted feature layer, the owner of the features, administrators of the organization, and members of a group with item update capability that the layer has been shared with can also choose to open the layer with full editing control even if editing is disabled. To open the layer with full editing control even if editing is disabled, open the item page, click Open in Map Viewer, and select Add layer to new map with full editing control from the drop-down menu. You can also choose this option from the item title drop-down menu on the My Content tab of the content page. This ensures that only authorized or trusted members of the organization, such as you, the map owner, and administrators, can edit your data.