import "@arcgis/map-components/components/arcgis-features";
Features component allows users to view a feature's popupTemplate content such as attributes, actions, related records, etc., without having to be tied to the View.
Demo
Properties
Property | Attribute | Type |
---|---|---|
| ||
active readonly | active | boolean |
auto-destroy-disabled | boolean | |
collapsed | boolean | |
content | HTMLElement | Widget | string | |
feature-navigation-top | boolean | |
| Array<Graphic> | |
features-per-page | number | |
features-title | string | |
| ||
| (((view: MapView | SceneView, goToParameters: GoToParameters) => void)) | |
| ||
heading-level | number | |
hide-action-bar | boolean | |
hide-close-button | boolean | |
hide-feature-menu-heading | boolean | |
hide-feature-navigation | boolean | |
hide-flow | boolean | |
hide-heading | boolean | |
hide-spinner | boolean | |
icon | string | |
include-default-actions | boolean | |
initial-display-mode | "feature" | "list" | |
label | string | |
| ||
position | "bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing" | |
| Array<Promise<any>> | |
reference-element | ArcgisLinkChart | ArcgisMap | ArcgisScene | string | |
selectedFeature readonly |
| |
selected-feature-index | number | |
show-collapse-button | boolean | |
| ||
state readonly | state | "disabled" | "ready" |
time-zone | string |
actions
actions: Collection<ActionButton | ActionToggle>
Collection of action or action toggle objects.
active
active: boolean
Indicates if the widget is active when it is visible and is not waiting for results.
- Attribute
- active
- Default value
- false
autoDestroyDisabled
autoDestroyDisabled: 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
collapsed
collapsed: boolean
Indicates whether the popup displays its content.
- Attribute
- collapsed
- Default value
- false
content
content: HTMLElement | Widget | string
The content of the Features widget.
- Attribute
- content
featureNavigationTop
featureNavigationTop: boolean
Indicates whether the feature navigation arrows are displayed at the top of the widget.
- Attribute
- feature-navigation-top
- Default value
- false
featuresPerPage
featuresPerPage: number
The number of features to fetch at one time.
- Attribute
- features-per-page
- Default value
- 20
featureViewModelAbilities
featureViewModelAbilities: Abilities
Defines the specific abilities that can be used when querying and displaying content.
goToOverride
goToOverride: (((view: MapView | SceneView, goToParameters: GoToParameters) => void))
This function provides the ability to override either the MapView goTo() or SceneView goTo() methods.
headerActions
headerActions: Collection<ActionBase>
The actions that are displayed in the header of the widget.
headingLevel
headingLevel: number
Indicates the heading level to use for the title of the widget.
- Attribute
- heading-level
hideFeatureMenuHeading
hideFeatureMenuHeading: boolean
- Attribute
- hide-feature-menu-heading
- Default value
- false
hideFeatureNavigation
hideFeatureNavigation: boolean
- Attribute
- hide-feature-navigation
- Default value
- false
icon
icon: string
Icon which represents the component. Typically used when the component is controlled by another component (e.g. by the Expand component). Search Calcite Icons for possible values.
- Attribute
- icon
- Default value
- null
includeDefaultActions
includeDefaultActions: boolean
Indicates whether or not to include defaultActions.
- Attribute
- include-default-actions
- Default value
- true
initialDisplayMode
initialDisplayMode: "feature" | "list"
Indicates whether to initially display a list of features, or the content for one feature.
- Attribute
- initial-display-mode
- Default value
- "feature"
map
map: Map
A map is required when the input features have a popupTemplate that contains Arcade expressions in ExpressionInfo or ExpressionContent that may use the $map
profile variable to access data from layers within a map.
- Default value
- null
position
position: "bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing"
- Attribute
- position
- Default value
- "bottom-left"
promises
promises: Array<Promise<any>>
An array of pending Promises that have not yet been fulfilled.
referenceElement
referenceElement: ArcgisLinkChart | ArcgisMap | ArcgisScene | string
- Attribute
- reference-element
selectedFeature
selectedFeature: Graphic
The selected feature accessed by the Features widget.
selectedFeatureIndex
selectedFeatureIndex: number
Index of the feature that is selected.
- Attribute
- selected-feature-index
showCollapseButton
showCollapseButton: boolean
- Attribute
- show-collapse-button
- Default value
- false
spatialReference
spatialReference: SpatialReference
The spatial reference used for Arcade operations.
- Default value
- null
state
state: "disabled" | "ready"
The view model's state.
- Attribute
- state
- Default value
- "disabled"
timeZone
timeZone: string
Dates and times displayed in the widget will be displayed in this time zone.
- Attribute
- time-zone
Methods
Method | Signature |
---|---|
clear(): Promise<void> | |
close(): Promise<void> | |
componentOnReady(): Promise<void> | |
destroy(): Promise<void> | |
fetchFeatures(screenPoint: __esri.FeaturesFetchFeaturesScreenPoint, options?: __esri.FetchFeaturesOptions): Promise<__esri.FetchPopupFeaturesResult> | |
next(): Promise<__esri.FeaturesViewModel> | |
open(options?: __esri.FeaturesOpenOptions): Promise<void> | |
previous(): Promise<__esri.FeaturesViewModel> | |
triggerAction(actionIndex: number): Promise<void> |
componentOnReady
componentOnReady(): Promise<void>
Create a promise that resolves once component is fully loaded.
- Returns
- Promise<void>
fetchFeatures
fetchFeatures(screenPoint: __esri.FeaturesFetchFeaturesScreenPoint, options?: __esri.FetchFeaturesOptions): Promise<__esri.FetchPopupFeaturesResult>
Parameters
Parameter | Type | Optional? |
---|---|---|
screenPoint | FeaturesFetchFeaturesScreenPoint | |
options | FetchFeaturesOptions | undefined |
- Returns
- Promise<FetchPopupFeaturesResult>
open
open(options?: __esri.FeaturesOpenOptions): Promise<void>
Parameters
Parameter | Type | Optional? |
---|---|---|
options | FeaturesOpenOptions | undefined |
- Returns
- Promise<void>
triggerAction
triggerAction(actionIndex: number): Promise<void>
Parameters
Parameter | Type | Optional? |
---|---|---|
actionIndex | number |
- Returns
- Promise<void>
Events
Event | Type |
---|---|
{ name: "state" | "selectedFeature" | "selectedFeatureIndex"; } | |
undefined | |
FeaturesTriggerActionEvent |