The hosted 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 users will use the layers.
The following sections explain two main types of hosted 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 hosted 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 users 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 can 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 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 layer. 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 layer in Map Viewer (formerly a separate beta installation, now present in the portal automatically) by adding a sketch layer. Sketch layers 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 Classic, be aware that the shapefile must be less than 2 MB in size and have fewer than 4,000 point features or 2,000 line or polygon features. 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 Classic 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.
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 Classic instead.
If multiple users need to edit your data, publish it as a hosted feature layer. When you publish features to ArcGIS Enterprise, the layer (an ArcGIS Server feature service) runs on the hosting server. You can publish features using the portal or ArcGIS Pro. From ArcGIS Pro, you can update and republish the data. If you need to republish frequently, you can automate the process via scripts. If you publish from a file in the portal (and sync is not enabled on the layer), you can overwrite the feature layer.
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 (formerly a separate beta installation, now included in the portal automatically) or Map Viewer Classic (formerly known as Map Viewer) using the editing tools available in each app.
When working with a hosted feature layer, the owner of the features, administrators of the organization, and members of a shared update group 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, you must open the layer in Map Viewer Classic. To do this, open the item page, click the drop-down arrow on the Open in Map Viewer or Open in Map Viewer Classic button, and select Open in Map Viewer Classic 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.