The Analysis widget provides an easy way to useArcGIS Online or Portal for ArcGIS spatial analysis tools in your application. With 25 analysis tools, the same as those in the ArcGIS Online Map Viewer, you can configure one tool per widget or multiple tools in a widget. See the Perform analysis section of the ArcGIS Online help for an introduction to spatial analysis, the license requirements to access analysis tools, and details about the usage of each tool. If you're a developer, you can access these tools via web APIs. For more information, see Spatial analysis service REST API.
Using a spatial analysis service consumes credits. For more information on credits, see Service credits overview.
Analysis tools must have access to the data used by the layers and services on which you run them. If you use ArcGIS Server map or feature services, the analysis tools must have access to the data; therefore, the URL to the service must be a public URL or be on the same network as your portal.
Configuring the Analysis widget
- Hover over the Analysis widget and click the small edit icon . The configuration window for this widget opens.
- Tools are listed alphabetically in the configuration window. Choose the tools you want to include in the widget.
- Click the settings icon next to your selected tool. The following options are available:
- The tool display name—Provide your tool name.
- Show help links in the widget—Controls whether to show help links in the widget.
- Show option to use the current map extent—Controls whether to show the option to use the current map extent.
- Display Show credits option—Controls whether to show the credits link.
- Save the result in user's account—Controls whether to allow users to save the result in their accounts.
- Show ready to use layers from ArcGIS Online living atlas of the world—Controls whether to show ready to use layers from ArcGIS Online Living Atlas of the World.
- Allow to export results---Controls whether to allow users to export the result to CSV, Feature Collection or GeoJSON formats.
- Repeat step 3 if you have more than one selected tool.
- Click OK to save the configuration and close the window.
Using the Analysis widget
To perform analysis, the administrator of your organization needs to grant you certain privileges. To use any of the analysis tools, you need the following privileges:
- Create, update, and delete content
- Publish hosted features
- Spatial analysis
Certain tools need additional privileges such as network analysis and GeoEnrichment. See Perform analysis for more information. If you don't have required privileges, the corresponding tools will not be available in the widget panel.
- Verify that you are signed in to your organization with privileges to perform analysis.
- Click the widget icon in your app to open the widget panel. If more than one tool is configured, choose tools one at a time to execute. If only one tool is available, it activates automatically. Click the help icon for information about the tool.
- Choose an input layer from the drop-down list, configure the parameters for the tool, and click Run Analysis.
- When the tool is running, the execution messages display in the panel. Click the cancel icon if you want to cancel the job.
A job for a tool consuming credits cannot be cancelled.
When the job is successful, the result is saved to My Content in the Contents page. Click the item link under Outputs to view the item details in your portal. In addition, the results as a feature layer or layers or a table or tables are automatically added to the map as operational layers.If the job is not successful, an error message displays in red. Click Back to return to the parameters' configuration. Additionally, you may see the output name with an export button if you choose the option to export the files.
- If you have more than one tool, click Home to choose other tools.
If you don't have required privileges to run a tool, the tool will not display in the widget panel. In addition to privileges, each tool has its own requirement for the layer or layers. If a tool does not have a required layer or layers in the map, the tool will be unavailable.
Also note that the Extract Data tool requires the extract capability be set in the service.