The Add Data widget allows you to add data to the map by searching for layers in ArcGIS content, entering URLs, or uploading local files. 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
This widget can be set to open automatically when an app starts. Hover over the widget and click the Do not open this widget when the app starts button to change the setting to Open this widget automatically when the app starts. (For widgets that you need to add to the app first, you can turn on this option after configuring the widget.)
- Hover over the widget and click the Configure this widget button to open the configuration window.
Note:
If you need to add the widget to the app first, click a widget placeholder on the Widget tab. In the Choose Widget window that opens, select the widget and click OK.
- Optionally, click the Change widget icon button to replace the default icon for this widget.
A File Explorer window appears, allowing you to upload a local image file to use as the widget icon.
- Optionally, change the number of items per page for the search result.
The default is 30.
- Use the following options to control the search scope.
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 shared publicly.
- Allow Curated—Search for data shared within a group. This requires the group ID with the group: prefix as a curated filter.
- Optionally, select Allow URL so users can add services to the map.
- Optionally, select Allow File so users can upload local files to the map, such as shapefiles and CSV files.
- Click OK to save the configuration.
Caution:
When you deploy the app locally, keep in mind that unlike hosted apps, 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, ensure the map is not shared publicly. In this way, when the deployed app opens, the sign-on dialog box appears, passing the credentials to the Add Data widget. By default, the widget only displays the public content if the credentials are not present.Caution:
If the app is shared publicly, do not enable Allow My Organzation or Allow My Content because the search will only execute against the public items.
Use the Add Data widget
- On the Search tab, choose the scope you want to search, and click the Add Data widget.
- In the Add Data window, search for the data you want to add to the map. Click Add on the specific item.
The added layer appears 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.
- Optionally, click the search button to search for layers.
- To search only layers within the map area, leave the toggle button green, which is the default. To search all layers in the scope, click the toggle button, which turns it red.
- Click the sort button to refine the type of search layer and sort the items.
- Click the Type drop-down list to search layers based on type, including map service, feature service, image service, vector tile service, and KML, WMS, WFS, and WMTS layers.
- Click the Sort By drop-down list to sort items by relevance, title, owner, rating, view, or date.
- If available, click the URL tab next to the Search tab to add layers by URL. Choose a type and enter the URL. Click Add to add the data to the map. The added layer appears in the Layer List widget as well. The following types are supported through the URL:
- ArcGIS Server web service
- WMS OGC web service
- WMTS OGC web service
- WFS OGC web service
- KML layer
- GeoRSS feed
- CSV file
Note:
For more information on CSV files, see CSV, TXT, and GPX files.
If you add a layer that has a spatial reference different from that of your basemap, especially the tile layers, the added layer might not be visible.
- Click Sample URL(s) to see the URL format for each type.
- If available, click the File tab to upload supported local files. You can either drag the file or browse to it.
You can upload local files in the following format:
- CSV
- KML
- Shapefile
- To remove the layers you added, click Layers in the lower right corner of the widget. In the Layers panel, click the Remove Layer button next to the layer to remove it.
- Click Back in the lower right corner to return to the main panel.