import "@arcgis/map-components/components/arcgis-feature";
Feature component displays a graphic according to its PopupTemplate. This component is useful in instances where you want to display information about a feature but without the use of a Popup.
Demo
Properties
Property | Attribute | Type |
---|---|---|
auto-destroy-disabled | boolean | |
default-popup-template-enabled | boolean | |
| ||
heading-level | number | |
hide-content-attachments | boolean | |
hide-content-expression | boolean | |
hide-content-fields | boolean | |
hide-content-media | boolean | |
hide-content-text | boolean | |
hide-last-edit-info | boolean | |
hide-title | boolean | |
icon | string | |
label | string | |
| ||
| ||
position | "bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing" | |
reference-element | ArcgisLinkChart | ArcgisMap | ArcgisScene | string | |
| ||
state readonly | state | "disabled" | "error" | "loading" | "ready" |
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
defaultPopupTemplateEnabled
defaultPopupTemplateEnabled: boolean
Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined.
- Attribute
- default-popup-template-enabled
- Default value
- false
headingLevel
headingLevel: number
Indicates the heading level to use for the title of the feature widget.
- Attribute
- heading-level
- Default value
- 2
hideContentAttachments
hideContentAttachments: boolean
- Attribute
- hide-content-attachments
- Default value
- false
hideContentExpression
hideContentExpression: boolean
- Attribute
- hide-content-expression
- 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
- "polygon"
location
location: Point
The Point representing the location of the MapView interaction used to trigger the opening of the widget.
- Default value
- null
map
map: Map
A map is required when the input graphic has 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"
referenceElement
referenceElement: ArcgisLinkChart | ArcgisMap | ArcgisScene | string
- Attribute
- reference-element
spatialReference
spatialReference: SpatialReference
The spatial reference used for Arcade operations.
- Default value
- null
state
state: "disabled" | "error" | "loading" | "ready"
The view model's state.
- Attribute
- state
- Default value
- "disabled"
Methods
Method | Signature |
---|---|
componentOnReady(): Promise<void> | |
destroy(): Promise<void> | |
nextMedia(contentElementIndex: number): Promise<void> | |
previousMedia(contentElementIndex: number): Promise<void> | |
setActiveMedia(contentElementIndex: number, mediaInfoIndex: number): Promise<void> |
componentOnReady
componentOnReady(): Promise<void>
Create a promise that resolves once component is fully loaded.
- Returns
- Promise<void>
nextMedia
nextMedia(contentElementIndex: number): Promise<void>
Parameters
Parameter | Type | Optional? |
---|---|---|
contentElementIndex | number |
- Returns
- Promise<void>
previousMedia
previousMedia(contentElementIndex: number): Promise<void>
Parameters
Parameter | Type | Optional? |
---|---|---|
contentElementIndex | number |
- Returns
- Promise<void>
setActiveMedia
setActiveMedia(contentElementIndex: number, mediaInfoIndex: number): Promise<void>
Parameters
Parameter | Type | Optional? |
---|---|---|
contentElementIndex | number | |
mediaInfoIndex | number |
- Returns
- Promise<void>
Events
Event | Type |
---|---|
{ name: "state"; } | |
undefined |