Skip To Content

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.

  • View in table—View the layer's attributes in a Table widget.
  • Export all—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. This setting also affects the Map widget's Layers tool.
      Note:

      You cannot access the Customize layers setting if multiple Map Layers widgets are connected to the same Map widget.

  • Options—Select from a variety of options to appear in the widget for each listed layer.
    Tip:

    To experiment with these options, click Live view on the builder toolbar.

    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.
    • Toggle layer visibility—Allow users to turn layer visibility on or off in the connected map.
      • Use tick boxes—Replace the eye visibility icons with tick boxes.
    • 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.

Interaction options

The Map Layers widget supports the Export and View in table data actions, which you can enable on the Action tab of the widget's settings. The View in table data action appears on the widget's Action tab when you include a Table widget in your app.