ESM
import "@arcgis/map-components/components/arcgis-exploratory-analysis";
Inheritance
ArcgisExploratoryAnalysis→HTMLElement
Since
ArcGIS Maps SDK for JavaScript 5.2
beta

The Exploratory Analysis component provides a container for measurement and analysis components and displays one active analysis at a time. Add one or more supported components as child elements.

Supported components include:

When multiple measurement components are provided, their icon and label properties are used to create a toolbar for switching between them.

See also

Demo

Example
<arcgis-map basemap="topo">
<arcgis-exploratory-analysis slot="top-right" show-close-button>
<arcgis-distance-measurement-2d></arcgis-distance-measurement-2d>
<arcgis-area-measurement-2d></arcgis-area-measurement-2d>
</arcgis-exploratory-analysis>
</arcgis-map>

Properties

PropertyAttributeType
active-analysis
auto-destroy-disabled
auto-start-disabled
closed
icon
preserve-analysis-on-change
require-active-analysis
show-close-button
show-collapse-button
reflected
show-heading

activeAnalysis

autocast Property
Type
MeasurementElement | undefined

The active child component. Set using the child component's tag name (i.e. arcgis-distance-measurement-2d). When set, this will display the specified analysis tool as the active component.

Attribute
active-analysis
Example
<arcgis-exploratory-analysis active-analysis="arcgis-distance-measurement-2d">
<arcgis-distance-measurement-2d></arcgis-distance-measurement-2d>
<arcgis-area-measurement-2d></arcgis-area-measurement-2d>
</arcgis-exploratory-analysis>

autoDestroyDisabled

Property
Type
boolean

If true, the component will not be destroyed automatically when it is disconnected from the document. This is useful when you want to move the component to a different place on the page, or temporarily hide it. If this is set, make sure to call the destroy() method when you are done to prevent memory leaks.

Attribute
auto-destroy-disabled
Default value
false
Example
<arcgis-exploratory-analysis auto-destroy-disabled></arcgis-exploratory-analysis>
exploratoryAnalysisElement.autoDestroyDisabled = true;

autoStartDisabled

Property
Type
boolean

Specifies whether selecting an analysis tool from the action bar waits for the user to start a new analysis via the button. By default, a new analysis is started once you click on the icon in the toolbar.

Attribute
auto-start-disabled
Default value
false
Example
<!-- user will have to click "New Measurement" to start measuring -->
<arcgis-exploratory-analysis auto-start-disabled="true">
<arcgis-direct-line-measurement-3d></arcgis-direct-line-measurement-3d>
<arcgis-area-measurement-3d></arcgis-area-measurement-3d>
</arcgis-exploratory-analysis>

closed

Property
Type
boolean

Indicates whether a component is closed. When true, the component will be hidden.

Attribute
closed
Default value
false
Example
<arcgis-exploratory-analysis closed></arcgis-exploratory-analysis>
exploratoryAnalysisElement.closed = true;

icon

Property
Type
IconName

Icon which represents the component. Typically used when the component is controlled by another component (e.g. by the Expand component).

See also
Attribute
icon
Default value
"measure"

messageOverrides

Property
Type
Record<string, unknown> | undefined

Replace localized message strings with your own strings.

Note: Individual message keys may change between releases.

preserveAnalysisOnChange

Property
Type
boolean

Specifies whether analysis results are preserved when the active analysis component changes. By default, the current analysis is cleared before another analysis component becomes active.

Attribute
preserve-analysis-on-change
Default value
false
Example
<arcgis-exploratory-analysis preserve-analysis-on-change>
<arcgis-direct-line-measurement-3d></arcgis-direct-line-measurement-3d>
<arcgis-area-measurement-3d></arcgis-area-measurement-3d>
</arcgis-exploratory-analysis>

requireActiveAnalysis

Property
Type
boolean

Specifies whether an analysis tool must remain active after it is selected. When enabled, selecting the active tool again does not collapse the component.

Attribute
require-active-analysis
Default value
false

showCloseButton

Property
Type
boolean

This property provides the ability to show or hide the close button. When the close button is shown, the ESC key can be used to close the component via keyboard when the focus is within the component.

Attribute
show-close-button
Default value
false
Example
<arcgis-exploratory-analysis show-close-button></arcgis-exploratory-analysis>
exploratoryAnalysisElement.showCloseButton = true;

showCollapseButton

Property
Type
boolean

This property provides the ability to show or hide the collapse button.

Attribute
show-collapse-button
Default value
false
Example
<arcgis-exploratory-analysis show-collapse-button></arcgis-exploratory-analysis>
exploratoryAnalysisElement.showCollapseButton = true;

showHeading

reflected Property
Type
boolean

This property provides the ability to show or hide the heading.

Attribute
show-heading
Default value
false
Example
<arcgis-exploratory-analysis show-heading></arcgis-exploratory-analysis>
exploratoryAnalysisElement.showHeading = true;

Methods

MethodSignature
inherited
componentOnReady(): Promise<this>
destroy(): Promise<void>

componentOnReady

inherited Method
Signature
componentOnReady (): Promise<this>

Creates a promise that resolves once the component is fully loaded.

Returns
Promise<this>
Example
const arcgisExploratoryAnalysis = document.createElement("arcgis-exploratory-analysis");
document.body.append(arcgisExploratoryAnalysis);
await arcgisExploratoryAnalysis.componentOnReady();
console.log("arcgis-exploratory-analysis is ready to go!");

destroy

Method
Signature
destroy (): Promise<void>

Permanently destroy the component.

Returns
Promise<void>

Events

arcgisClose

Event
arcgisClose: CustomEvent<void>

Emitted when the component's close button is clicked.

bubbles composed cancelable

arcgisPropertyChange

Event
arcgisPropertyChange: CustomEvent<{ name: "activeAnalysis"; }>

Emitted when the value of a property is changed. Use this to listen to changes to properties.

bubbles composed cancelable

arcgisReady

Event
arcgisReady: CustomEvent<void>

Emitted when the component associated with a map or scene view is ready for user interaction.

bubbles composed cancelable

Type definitions

MeasurementElementName

Type definition

Variables

measurementElementNames

Variable
Type
readonly [ "arcgis-area-measurement-2d", "arcgis-area-measurement-3d", "arcgis-direct-line-measurement-3d", "arcgis-distance-measurement-2d", "arcgis-elevation-profile", "arcgis-volume-measurement" ]