Add Data widget

The Add Data widget enables you to add data to the map by searching for layers in ArcGIS Online or Portal for ArcGIS content, entering URLs, or uploading local files including shapefiles, CSV, GPX, and GeoJSON. In this way, you can temporarily add layers to and remove layers from the map. However, you can't save the layers to the map.

Configure the Add Data widget

The Add Data widget can be set to open automatically when an app starts. To enable this function, click the dot on the widget, which turns it dark green.

  1. Hover over the Add Data widget and click the edit button Edit.

    The configuration window for this widget appears.

  2. Optionally click change widget icon to replace the default icon for this widget.

    A file explorer window appears, allowing you to b a local image file to use as the widget icon.

  3. Optionally change the number of items per page for the search result.

    The default is 30.

  4. Use the following options to control the search scope in ArcGIS Online or Portal for ArcGIS. Replace the default labels and select the default search option if necessary.
    • Allow My Content—Search for your private data.
    • Allow My Organization—Search for data shared within the organization.
    • Allow ArcGIS Online—Search for data publicly available though ArcGIS Online or Portal for ArcGIS if applicable.
    • Allow Curated—Search for data shared within a group. This requires the group ID with the group: prefix as a curated filter.
      Curated filter
  5. Caution:
    When you deploy the app locally, keep in mind that unlike hosted apps in ArcGIS Online or Portal for ArcGIS, there is no scope control over the deployed app. As a result, you should use the map scope to control the search scope of the Add Data widget. If you want to search the data in My Organization or My Content, make sure the map is not shared publicly. In this way, when the deployed app opens, the sign in the dialog box shows, passing the credentials to the Add Data widget. By default, the widget only shows the public content if the credentials are not present.
  6. The Allow URL option enables you to add services to the map.
  7. The Allow File option enables you to upload local files to the map, including shapefiles, CSV, GPX, and GeoJSON.
  8. Click OK to save the configuration.

Use the Add Data widget

  1. On the Search tab, choose the scope you want to search and click Add on a specific item to add the layer to the map. The added layer will appear in the Layer List widget as well. Click Remove to remove the layer from the map and the Layer List widget. Click Details to get information about the layer.
    Caution:

    If the app is shared publicly, do not enable Allow My Organzation or Allow My Content as the search will only execute against the public items.

  2. Optionally click the search button to search for layers.
  3. To search only layers within the map area, leave the toggle button Search within the map area green, which is the default. To search all layers in the scope, click the toggle button, which turns it red.
  4. Click the sort button Search layer type and item sorting to refine the type of search layer and sort the items.
    • Click the Type drop-down list to search layers based on map service, feature service, image service, vector tile service, KML layer, or WMS layer.
    • Click the Sort By drop-down list to sort items by relevance, title, owner, rating, view, or date.
  5. To add layers by URL, click the URL tab next to the Search tab. Choose a type and enter the URL. Click Add to add the data to the map. The added layer will appear in the Layer List widget as well. The following types are supported through the URL:
    • ArcGIS Server web service
    • WMS OGC web service
    • KML layer
    • GeoRSS feed
    • CSV file
      Note:

      For more information on CSV files, see CSV, TXT, and GPX files.

  6. Click Sample URL(s) to see the URL format for each type.
  7. Click the File tab to upload files locally. You can either drag the file or browse to it. Shapefiles in ZIP format as well as CSV, GPX and GeoJSON files are supported.
  8. To remove the layers added in steps 5 through 7, click Layers in the lower-right corner of the widget. In the Layers panel, click the delete button next to the layer to remove it.
  9. Click Back in the lower-right corner to return to the main panel.