Overview

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 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.

Steps

Make a copy of a layer

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.

  1. Go to ArcGIS Online and sign in.

  2. In the top nav, click Content > Add Item > From the web and set the following:

    • URL: https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Trails/FeatureServer
    • Title: Trails_Copy
    • Tags: trails

    Click Add Item.

Set sharing permissions

  1. Click Overview to access the layer's main properties.

  2. Click Share:

    • Uncheck Everyone (if it is set).
    • Check [your_name]

    Click Ok.

Set the field visibility

  1. Click Data to access the layer's fields, values, and records.

  2. At the top-right, click the menu > Show/Hide Columns and only show the following fields:

    • TRL_NAME
    • ELEV_GAIN
    • LENGTH_MI
    • USE_HIKE
    • USE_BIKE

Set the visualization properties

  1. Click Visualization to access the layer's symbols, filter, labels, and pop-ups.

  2. Click Change Style > Options > Symbols to set the default symbol or renderer used to draw the layer. Add the following properties:

    • Color: black
    • Line Width: 1.2
    • Pattern: Dots

    Click Ok > Ok > Done and Save Layer.

  3. Click Filter > Create and set the following properties to define a default SQL expression filter:

    • TRL_NAME (field)
    • contains (operator)
    • Backbone (type this in)

    Click Apply Filter and Save Layer.

  4. 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
  1. Click Ok > Save Layer.

  2. Click on some features and verify the pop-up appears with the correct fields.

Congratulations, you're done!

Your copied layer should look something like this.

Challenge

Set more properties

The Settings tab lets you set the layer editing, extent, layer drawing and other advanced properties.

  1. Click Settings to activate the tab.

  2. Click Delete Protection to prevent accidental deletion.

  3. 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.