Map Layers widget

The Map Layers widget displays a list of map layers.

Examples

Use this widget to support app design requirements such as the following:

  • You want to list a map's layers and allow users to control their visibility.
  • You want to leave some layers off of your map's layer list.

Usage notes

This widget requires connection to a data source. You can connect to a data source directly or connect to a Map widget in your app. You can use the Map Layers widget on a page with or without a displayed map.

When you connect this widget to a Map widget, the Map Layers widget can provide users with the following interaction options for each listed layer. Each option must be turned on in the widget's settings:

  • Zoom to—Zoom the connected map to the extent of the layer.
  • Show labels or Hide labelsFor layers with labels, show or hide labels.
  • Increase transparency and Decrease transparency—Change the transparency of the layer in the connected map.
  • Details—Open the details page for the layer.
    Tip:

    If the layer is an ArcGIS Online item, clicking Details opens the layer's item page.

  • Add to table—View the layer's attributes in a Table widget.
  • Export—Export all records from the corresponding layer to CSV, JSON, or GeoJSON formats.

Settings

The Map Layers widget includes the following settings:

  • Source—Web map or web scene data, or a Map widget in your app that displays a 2D or 3D map.
  • Customize layers (available when you connect a Map widget)—Customize which layers appear in the layer list. Any web maps or scenes connected to the Map widget are listed here. If you click a web map or scene, a panel listing all of the map's or scene's layers appears.
    • Enable customize layers—Turn on this setting to select which layers appear in the layer list at run time.
  • Options—Select from a variety of options to appear in the widget for each listed layer.

    The following options are only available when configuring this widget to work with a Map widget:

    • Zoom to—Include the Zoom to button for each layer.
    • Show or hide labelsFor layers with labels, allow users to show or hide labels.
    • Transparency—Allow users to change the transparencies of layers in the connected map.
    • View layer details—Include the Details button.
    • Use tick boxes to control layer visibility—Include tick boxes that allow users to turn layer visibility on or off in the connected map.
    • Show legend—Display a legend for all visible layers.
      • Show legend for all visible layers by default—Expand the legend for all visible layers by default.
    • Reorder layers—Allow users to drag layers to reorder them at run time. This setting is applicable when there are at least two layers.
    • Search layers—Include a search box at the top of the widget panel that allows users to search for layers by name. This setting is applicable when there are at least two layers.

Interaction options

The Map Layers widget supports data actions, which you can enable on the Action tab of the widget's settings.

Data actions add buttons to the widget's user interface for performing data processing tasks. The Map Layers widget currently supports the following data actions at the data source level. When the target is a widget, the data action appears as an option in the Map Layers widget's settings when you add one of those widgets to the app.

TargetData action

Framework

Export

Set filter

Statistics

Near Me widget

Set location

Table widget

Add to table