You will learn: how to set the default style, data and sharing properties for feature layers.
The item details page in ArcGIS Online allows you to manage and configure a layer. You can set a layer's main properties such as the name, description, and sharing capabilities, but you can also set more advanced properties such as the default symbols (renderer) to control how features are visualized, or a SQL expression to limit the features that can be accessed. When you save a layer item, all of the properties are stored with the item as JSON.
In this tutorial you will learn how to configure a number of layer properties with the item details page. If you are building applications, configuring layers is helpful because it gives you a central way to control how all applications will access the layer and will reduce the amount of code you need to write.
You can save your own configuration of a layer by saving a copy of it. The new layer is a new copy of the item, not the underlying data.
Go to ArcGIS Online and sign in.
In the top nav, click Content > Add Item > From the web and set the following:
https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Trails/FeatureServer
Trails_Copy
Click Add Item.
Click Overview to access the layer's main properties.
Click Share:
Click Ok.
Click Data to access the layer's fields, values, and records.
At the top-right, click the menu > Show/Hide Columns and only show the following fields:
Click Visualization to access the layer's symbols, filter, labels, and pop-ups.
Click Change Style > Options > Symbols to set the default symbol or renderer used to draw the layer. Add the following properties:
Click Ok > Ok > Done and Save Layer.
Click Filter > Create and set the following properties to define a default SQL expression filter:
Click Apply Filter and Save Layer.
Click Configure Pop-up and set the following properties to configure default pop-up settings:
Pop-up Title: | Trail Info |
Configure Attributes: | Only show the following fields: TRL_NAME, ELEV_GAIN, LENGTH_MI, USE_HIKE, USE_BIKE |
Click Ok > Save Layer.
Click on some features and verify the pop-up appears with the correct fields.
Your copied layer should look something like this.
The Settings tab lets you set the layer editing, extent, layer drawing and other advanced properties.
Click Settings to activate the tab.
Click Delete Protection to prevent accidental deletion.
Click Set Extent and set a new extent for the layer.
Note: If you are the original owner of the layer you can also set the Optimize Layer Drawing and the Export Data properties.