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. Publish your data as a hosted tile layer if your data is seldom updated and mainly serves to provide visual context to the map. You should also publish a hosted tile layer if you have a large number of complex features to display in a single layer.

When you publish a hosted (raster) tile layer from a hosted feature layer, you can enable pop-ups on the hosted tile layers to allow the people viewing your map to interact with the hosted tile layer. For example, your county boundaries are unlikely to change very often, so these would be good candidates for hosted tile layers. If your boundaries have census data, you could display these as polygons and enable pop-ups to show the attribute information.

If you want the rapid drawing times of tiles but disk space on the hosting server is a concern or you need to update the tiles occasionally, publish a hosted vector tile layer. Note that creating vector tiles requires ArcGIS Pro.

If you want the rapid drawing times of tiles, you need to update the tiles occasionally, and you don't need pop-ups, publish a hosted vector tile layer. Note that creating vector tiles requires ArcGIS Pro.

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 multiple people need to edit your data, publish it as a hosted feature layer. When you publish features to your portal, the layer (an ArcGIS feature service) runs on the portal's hosting server. You can publish features using the portal website, ArcMap, or ArcGIS Pro. From ArcMap and ArcGIS Pro, you can also update and republish your data. If you need to republish frequently, you can automate the process via scripts.

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 you share your hosted feature layer publicly with editing enabled, anyone with access to the hosted feature layer URL can edit the data.

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.