Portal for ArcGIS lets you share your information with members of your organization through interactive web maps. When you share your data through a map layer, any member of your organization with a web browser, mobile device, or desktop viewer can access it. While sharing your data is important, how you share is even more important. Below are some best practices for using layers in maps that perform well on the web.
Understand when to use tiles and features
Different types of layers can be added to your map. These layer types provide optimized functionality, from rapid display to complex queries and multiuser editing. The correct type of layer effectively communicates your message in the map. It can also help by efficiently storing your layer and will quickly load your map under high demand.
If your data is seldom updated and mainly serves to provide visual context to the map or contains a large number of features, publish your data as a hosted tile layer. Tiles support fast visualization of large datasets. If you want people viewing your map to interact with the hosted tile layer, you can enable pop-ups on the hosted tile layers. Do this by specifying a hosted feature layer with the information you want to return behind the tiles. These tiles are ideal for complex polygon data and other large datasets that are not frequently updated. 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 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 and drop it into 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 layers. 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 someone opens it's opened.
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, 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 data
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 the editing tools that come with Map Viewer. 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 in 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.
Optimize your maps for high demand
Follow these guidelines for optimizing the layers in your map to reduce the time it takes to load the map during high-demand activity (such as when thousands of clients access it at once).
- If your data does not require frequent updates, use hosted tile layers instead of hosted feature layers and enable pop-ups if you want to include attribute information. Tiles offer the fastest drawing time for large datasets.
- If the data has less than 4,000 point features or 2,000 line or polygon features and only you need to edit it, add the data to your map as a feature collection. However, this is not an efficient way to manage data that needs to be updated frequently or needs multiple editors.
- If your data has more than 4,000 point features or 2,000 line or polygon features, or is larger than 10 MB, publish it as a hosted feature layer and make sure editing is disabled. When editing is enabled, the browser makes larger requests to include full geometry of the hosted feature layer, which makes the layer slower to draw. The layer owner, organization administrators, and members of groups with item update capability with whom you've shared the layer can open the hosted feature layer with editing enabled without having to enable editing for everyone else.
- You can export a hosted feature layer as a feature collection generalized for web display. You lose some precision but optimize the drawing speed. Exported feature collections that have been generalized for web display only work in web apps. They do not work in desktop and mobile apps.
- Remove any filters on your hosted feature layers. If it is important to manage a subset of the features as an individual layer, publish each filtered set of data as its own individual layer.