▾
import "@arcgis/map-components/components/arcgis-exploratory-analysis";- Inheritance
- ArcgisExploratoryAnalysis→
HTMLElement
- Since
- ArcGIS Maps SDK for JavaScript 5.2
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:
- arcgis-area-measurement-2d
- arcgis-area-measurement-3d
- arcgis-direct-line-measurement-3d
- arcgis-distance-measurement-2d
- arcgis-elevation-profile
- arcgis-volume-measurement
When multiple measurement components are provided, their icon and label properties are used to create a toolbar for switching between them.
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
| Property | Attribute | Type |
|---|---|---|
| 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
- 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
- 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
- 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
- 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
- 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"
preserveAnalysisOnChange
- 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
- 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
- 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
- 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
- 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
| Method | Signature |
|---|---|
| inherited | componentOnReady(): Promise<this> |
| destroy(): Promise<void> |
componentOnReady
- 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!");
Events
| Name | Type |
|---|---|
| CustomEvent<{ name: "activeAnalysis"; }> | |
arcgisClose
arcgisClose: CustomEvent<void> Emitted when the component's close button is clicked.
arcgisPropertyChange
arcgisPropertyChange: CustomEvent<{ name: "activeAnalysis"; }> Emitted when the value of a property is changed. Use this to listen to changes to properties.
arcgisReady
arcgisReady: CustomEvent<void> Emitted when the component associated with a map or scene view is ready for user interaction.
Type definitions
MeasurementElementName
- Type
- (typeof measurementElementNames)[number]