You will learn: how to set the default layer properties to control how a layer is viewed by applications.
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 lab 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.
Click this link to access Trails item details page.
In the item details page, click Visualization and Save as a new layer. Set the following:
|Title:||Trails-Copy (or change this to a name you will remember)|
|Summary:||Trails west of LA|
Click Overview to access the layer's main properties.
Click Data to access the layer's fields, values, and records.
At the top-right, click the menu 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 when finished.
Click Save Layer.
Click Filter > Create and set the following properties to define a default SQL expression filter:
Click Apply Filter.
Click 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 > 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.
Load your data into the cloud (xls, gpx, GeoJSON, shapefiles).
Define and populate datasets in the cloud for your apps.
View features with ArcGIS Online tools and the REST API.
Explore layers and maps from a variety of sources.
Keep your layers private, or share them publicly.
Use the Map Viewer to find layers and create a new web map.
Use the ArcGIS Vector Style Editor to create basemaps with custom styles.
Use the Map Viewer to style layers and create meaningful visualizations.
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.