import type Graphic from "../Graphic.js"; import type EsriMap from "../Map.js"; import type Collection from "../core/Collection.js"; import type Point from "../geometry/Point.js"; import type SpatialReference from "../geometry/SpatialReference.js"; import type Feature from "./Feature.js"; import type FeatureAbilities from "./support/FeatureAbilities.js"; import type { EventedAccessor } from "../core/Evented.js"; import type { ScreenPoint } from "../core/types.js"; import type { SpatialReferenceProperties } from "../geometry/SpatialReference.js"; import type { FetchFeaturesOptions, InitialDisplayOptions, PopupAction, State } from "./types.js"; import type { TimeZone } from "../time/types.js"; import type { MapViewOrSceneView } from "../views/MapViewOrSceneView.js"; import type { FetchPopupFeaturesResult } from "../views/types.js"; import type { GoTo, GoToProperties } from "../widgets/support/GoTo.js"; import type { GoToParameters } from "../widgets/support/types.js"; import type { ActionToggleProperties } from "../support/actions/ActionToggle.js"; import type { ActionButtonProperties } from "../support/actions/ActionButton.js"; import type { ReadonlyArrayOrCollection } from "../core/Collection.js"; import type { FeatureAbilitiesProperties } from "./support/FeatureAbilities.js"; import type { PointProperties } from "../geometry/Point.js"; /** @internal */ export interface FeaturesProperties extends GoToProperties, Partial> { /** * [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/) of [action](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or [action toggle](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/) objects. * Each action may be executed by clicking the icon or image symbolizing them. * By default, a `Zoom To` action styled with a magnifying glass icon is included. * When this icon is clicked, the view zooms in four LODs and centers on the selected feature. * * This default action can be removed by setting [includeDefaultActions](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#includeDefaultActions) to `false`, or by setting the * [PopupTemplate.overwriteActions](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#overwriteActions) property to `true` in a [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/). * The order of each action is the order in which they appear in the actions [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/). * * @internal * @see [Sample - Popup actions](https://developers.arcgis.com/javascript/latest/sample-code/popup-actions/) * @example * ```js * // Defines an action button to zoom out from the selected feature * const zoomOutAction = new ActionButton({ * title: "Zoom out", * // The ID by which to reference the action in the event handler * id: "zoom-out", * // Sets the icon used to style the action button * icon: "magnifying-glass-minus" * }); * // Adds the custom action to the popup. * featuresModel.actions.push(zoomOutAction); * ``` */ actions?: ReadonlyArrayOrCollection<((ActionButtonProperties & { type: "button" }) | (ActionToggleProperties & { type: "toggle" }))>; /** * Defines the specific [FeatureAbilities](https://developers.arcgis.com/javascript/latest/references/core/popup/support/FeatureAbilities/) that can be used when querying and displaying content. * * @internal */ featureItemAbilities?: FeatureAbilitiesProperties | null; /** * Geometry used to show the location of the feature. This is automatically set when selecting a feature. If displaying content not related * to features in the map, such as the results from a task, then you must set this * property before setting [open](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#open) to `true`. * * @internal * @see [Get started with popups](https://developers.arcgis.com/javascript/latest/sample-code/intro-popup/) * @example * // Sets the location to the center of the view * featuresItem.location = view.center; * featuresItem.open = true; * @example * // Display the featuresItem when and where the user clicks the view. * reactiveUtils.on(()=>view, "click", ({ mapPoint })=>{ * featuresItem.location = mapPoint; * featuresItem.open = true; * }); */ location?: PointProperties | null; /** * The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations. * This property should be set if Arcade expressions are executed that contain [geometry functions](https://developers.arcgis.com/arcade/function-reference/geometry_functions/). * * Alternatively, the [view](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#view) property can be used to provide the spatial reference instance for this property. * * @internal * @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection) * @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/) */ spatialReference?: SpatialReferenceProperties | null; /** * Dates and times will be displayed in this time zone. By default this time zone is * inherited from [MapView.timeZone](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone) if the [view](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#view) property is set. When a MapView is not associated, then the property will fallback to the `system` time zone. * * **Possible Values** * * Value | Description | * ----- | ----------- | * system | Dates and times will be displayed in the timezone of the device or browser. * unknown | Dates and time are not adjusted for any timezone. * Specified IANA timezone | Dates and times will be displayed in the specified IANA time zone. See [wikipedia - List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). * * @internal */ timeZone?: TimeZone | null; } /** * Provides reactive state and behavior for the [Features](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/) component, including fetching and paging popup features, tracking selection, and coordinating highlighting and actions. * * @internal * @since 5.1 * @see [Features component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/) * @see [Popup component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-popup/) * @see [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) */ export default class Features extends FeaturesSuperclass { /** @internal */ constructor(properties?: FeaturesProperties); /** * [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/) of [action](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or [action toggle](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/) objects. * Each action may be executed by clicking the icon or image symbolizing them. * By default, a `Zoom To` action styled with a magnifying glass icon is included. * When this icon is clicked, the view zooms in four LODs and centers on the selected feature. * * This default action can be removed by setting [includeDefaultActions](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#includeDefaultActions) to `false`, or by setting the * [PopupTemplate.overwriteActions](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#overwriteActions) property to `true` in a [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/). * The order of each action is the order in which they appear in the actions [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/). * * @internal * @see [Sample - Popup actions](https://developers.arcgis.com/javascript/latest/sample-code/popup-actions/) * @example * ```js * // Defines an action button to zoom out from the selected feature * const zoomOutAction = new ActionButton({ * title: "Zoom out", * // The ID by which to reference the action in the event handler * id: "zoom-out", * // Sets the icon used to style the action button * icon: "magnifying-glass-minus" * }); * // Adds the custom action to the popup. * featuresModel.actions.push(zoomOutAction); * ``` */ get actions(): Collection; set actions(value: ReadonlyArrayOrCollection<((ActionButtonProperties & { type: "button" }) | (ActionToggleProperties & { type: "toggle" }))>); /** * Indicates if the features component is open and is not [waiting for results](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#waitingForResult). * * @internal * @see [waitingForResult](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#waitingForResult) * @see [open](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#open) */ get active(): boolean; /** * The highlighted feature on the map that is either hovered over or in focus within the feature menu. * * @internal */ accessor activeFeature: Graphic | null | undefined; /** * Indicates if aggregated feature browsing is active in a * [cluster](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/). This value becomes * `true` when the user enables feature browsing with the "Browse features" cluster * [action button](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/). * the "Browse features" action. This should only be set programmatically when the * [selectedFeature](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#selectedFeature) is * an [aggregate graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#isAggregate) and represents a cluster. * * @default false * @internal */ accessor aggregatedFeaturesEnabled: boolean; /** * A collection of [actions](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or [action toggles](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/). * * @internal */ get allActions(): Collection; /** * The information to display. When this property is set, this content may * only be static and cannot use fields to set content templates. To set a template * for the content based on field or attribute names, see * [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content). * * @internal * @see [Sample - Popup Docking](https://developers.arcgis.com/javascript/latest/sample-code/popup-docking-position/) * @example * ```js * // This sets generic instructions in the popup that will always be displayed * // unless it is overridden by a PopupTemplate. * features.content = "Click a feature on the map to view its attributes"; * ``` */ accessor content: string | HTMLElement | null | undefined; /** * A read-only property that specifies a [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/) of action [buttons](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) and/or [toggles](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/). * By default, there is a "Zoom to" action that allows users to zoom to the selected feature. * * > [!WARNING] * > * > In order to disable any default actions, it is necessary to set [includeDefaultActions](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#includeDefaultActions) to `false`. * * @internal */ get defaultActions(): Collection; /** * Enables automatic creation of a popup template for layers that have popups enabled but no * popupTemplate defined. Automatic popup templates are supported for layers that * support the `createPopupTemplate` method. (Supported for * [BuildingComponentSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/buildingSublayers/BuildingComponentSublayer/), * [CatalogFootprintLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/catalog/CatalogFootprintLayer/), * [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/), * [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/), * [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/), * [ImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/)), * [ImageryTileLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryTileLayer/), * [KnowledgeGraphSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/knowledgeGraph/KnowledgeGraphSublayer/), * [OGCFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OGCFeatureLayer/), * [ParquetLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/), * [PointCloudLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/PointCloudLayer/), * [SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/), * [StreamLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/StreamLayer/), * [Sublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Sublayer/), * [SubtypeSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/), * [VoxelLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/VoxelLayer/), * [WCSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WCSLayer/), and * [WFSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/)). * * @default false * @internal */ accessor defaultPopupTemplateEnabled: boolean; /** * The heading currently displayed for the selected feature item. * * This value resolves to the selected feature item's heading when available, * otherwise it falls back to [heading](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#heading). * * @internal * @see [heading](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#heading) * @see [selectedFeatureItem](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#selectedFeatureItem) */ get effectiveHeading(): string | null | undefined; /** * The number of selected [features](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#features) available. * * @default 0 * @internal */ get featureCount(): number; /** * Defines the specific [FeatureAbilities](https://developers.arcgis.com/javascript/latest/references/core/popup/support/FeatureAbilities/) that can be used when querying and displaying content. * * @internal */ get featureItemAbilities(): FeatureAbilities | null | undefined; set featureItemAbilities(value: FeatureAbilitiesProperties | null | undefined); /** * An array of [Feature](https://developers.arcgis.com/javascript/latest/references/core/popup/Feature/) items. * * @internal */ get featureItems(): Feature[]; /** * The current page number in the feature browsing menu. If the feature menu is not open, this value is `null`. * This value is dependent on the [featuresPerPage](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#featuresPerPage). * * @internal */ accessor featurePage: number | null | undefined; /** * An array of features. Each graphic in this array must * have a valid [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) set. They may share the same * [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) or have unique * [PopupTemplates](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) depending on their attributes. * The [content](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#content) and [heading](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#heading) properties * are set based on the `content` and `title` properties of each graphic's respective * [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/). * * When more than one graphic exists in this array, the current content is set based on the value of the [selected feature](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#selectedFeature). * * @internal * @example * ```js * // When setting the features property, the graphics pushed to this property * // must have a PopupTemplate set. * let g1 = new Graphic(); * g1.popupTemplate = new PopupTemplate({ * title: "Results title", * content: "Results: {ATTRIBUTE_NAME}" * }); * // Create an array of graphics and set this to the features property. The content and heading of * // will be set depending on the PopupTemplate of the graphics. * // Each graphic may share the same PopupTemplate or have a unique PopupTemplate. * let graphics = [g1, g2, g3, g4, g5]; * featuresItem.features = graphics; * ``` */ accessor features: Graphic[]; /** * The number of features to fetch at one time. * * @default 20 * @internal */ accessor featuresPerPage: number; /** * The heading. This can be set to any string value no * matter the features that are selected. If the [selected feature](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#selectedFeature) * has a [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/), then the title set in the * corresponding template is used here. * * @internal * @example * ```js * // This heading will display in the popup unless a selected feature's * // PopupTemplate overrides it. * featureComponent.heading = "Population by zip codes in Southern California"; * ``` */ accessor heading: string | null | undefined; /** * Highlight the selected feature using one of the [HighlightOptions](https://developers.arcgis.com/javascript/latest/references/core/views/support/HighlightOptions/) defined in the view's * [View.highlights](https://developers.arcgis.com/javascript/latest/references/core/views/View/#highlights) collection. * * @default true * @internal */ accessor highlightEnabled: boolean; /** * Indicates whether or not to include [defaultActions](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#defaultActions). * * > [!WARNING] * > * > In order to disable any [default actions](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#defaultActions), it is necessary to set [includeDefaultActions](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#includeDefaultActions) to `false`. * * @default true * @internal * @example * // Removes the default actions * featureComponent.includeDefaultActions = false; */ accessor includeDefaultActions: boolean; /** * Indicates whether to initially display a list of features, or the content for one feature. * * @default "feature" * @internal */ accessor initialDisplayMode: InitialDisplayOptions; /** * Geometry used to show the location of the feature. This is automatically set when selecting a feature. If displaying content not related * to features in the map, such as the results from a task, then you must set this * property before setting [open](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#open) to `true`. * * @internal * @see [Get started with popups](https://developers.arcgis.com/javascript/latest/sample-code/intro-popup/) * @example * // Sets the location to the center of the view * featuresItem.location = view.center; * featuresItem.open = true; * @example * // Display the featuresItem when and where the user clicks the view. * reactiveUtils.on(()=>view, "click", ({ mapPoint })=>{ * featuresItem.location = mapPoint; * featuresItem.open = true; * }); */ get location(): Point | null | undefined; set location(value: PointProperties | null | undefined); /** * A map is required when the input [features](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#features) have a popupTemplate that contains [Arcade](https://developers.arcgis.com/arcade) expressions in [ExpressionInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/ExpressionInfo/) or [ExpressionContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/ExpressionContent/) that may use the `$map` profile variable to access data from layers within a map. Without a map, expressions that use `$map` will throw an error. * * Alternatively, the [view](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#view) property can be used to provide the map instance for this property. * * @internal * @since 4.30 * @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection) * @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/) * @example * // The building footprints represent the buildings that intersect a clicked parcel * let buildingFootprints = Intersects($feature, FeatureSetByName($map, "Building Footprints")); */ accessor map: EsriMap | null | undefined; /** * Indicates whether the component is open. This property is `true` when querying for results, even if it is not open. * Use the [active](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#active) property to check if the component is open and is not [waiting for results](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#waitingForResult). * * @default false * @internal * @see [active](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#active) * @see [waitingForResult](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#waitingForResult) */ accessor open: boolean; /** * The number of [promises](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#promises) remaining to be resolved. * * @default 0 * @internal * @see [promises property](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#promises) */ get pendingPromisesCount(): number; /** * The number of selected [promises](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#promises) available. * * @default 0 * @internal */ get promiseCount(): number; /** * An array of pending Promises that have not yet been fulfilled. If there are * no pending Promises, the value is `null`. When the pending Promises are * resolved they are removed from this array and the features they return * are pushed into the [features](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#features) array. * * @internal */ accessor promises: Promise[]; /** * The selected feature accessed. The [content](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#content) is * determined based on the [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) assigned to * this feature. * * @internal */ get selectedFeature(): Graphic | null; /** * Index of the feature that is [selected](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#selectedFeature). When [features](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#features) are set, * the first index is automatically selected. * * @internal */ accessor selectedFeatureIndex: number; /** * The selected [Feature](https://developers.arcgis.com/javascript/latest/references/core/popup/Feature/) item. * * @internal */ get selectedFeatureItem(): Feature; /** * The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations. * This property should be set if Arcade expressions are executed that contain [geometry functions](https://developers.arcgis.com/arcade/function-reference/geometry_functions/). * * Alternatively, the [view](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#view) property can be used to provide the spatial reference instance for this property. * * @internal * @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection) * @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/) */ get spatialReference(): SpatialReference | null | undefined; set spatialReference(value: SpatialReferenceProperties | null | undefined); /** * The state. * * @default "disabled" * @internal */ get state(): State; /** * Dates and times will be displayed in this time zone. By default this time zone is * inherited from [MapView.timeZone](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone) if the [view](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#view) property is set. When a MapView is not associated, then the property will fallback to the `system` time zone. * * **Possible Values** * * Value | Description | * ----- | ----------- | * system | Dates and times will be displayed in the timezone of the device or browser. * unknown | Dates and time are not adjusted for any timezone. * Specified IANA timezone | Dates and times will be displayed in the specified IANA time zone. See [wikipedia - List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). * * @internal */ get timeZone(): TimeZone; set timeZone(value: TimeZone | null | undefined); /** * Indicates whether to update the [location](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#location) when the [selectedFeatureIndex](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#selectedFeatureIndex) changes. * * @default false * @internal */ accessor updateLocationEnabled: boolean; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). * * > [!WARNING] * > * > A view is required if the user expects it to display content in any of the following situations: * > - The [features](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#features) have a popupTemplate containing Arcade expressions in [ExpressionInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/ExpressionInfo/) or [ExpressionContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/ExpressionContent/) that may use [geometry functions](https://developers.arcgis.com/arcade/function-reference/geometry_functions/) or reference the `$map` profile variable (i.e. access data from layers within a map). * > - Content is displayed from the popup template of an [aggregate feature](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#isAggregate) (i.e. a [cluster](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/) or [bin](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/)). * > - Values from `date` and `timestamp-offset` [fields](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Field/#type) should respect the view's [time zone](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone). * > - When using the [fetchFeatures()](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#fetchFeatures) method. * * @internal */ accessor view: MapViewOrSceneView | null | undefined; /** * Indicates whether the component is waiting for content to be resolved. * * @internal */ get waitingForContents(): boolean; /** * Indicates whether a feature was found while resolving [promises](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#promises). * * @default false * @internal * @see [active](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#active) */ get waitingForResult(): boolean; /** * Number of levels of detail (LOD) to zoom in on the [selected feature](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#selectedFeature). * * @default 4 * @internal * @example * // Restricts the zooming to two LODS when the zoom in action is clicked. * featureComponent.zoomFactor = 2; */ accessor zoomFactor: number; /** * Removes all [promises](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#promises), [features](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#features), [content](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#content), and * [heading](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#heading). * * @internal */ clear(): void; /** * Use this method to return feature(s) at a given screen location. * These features are fetched from all of the * [LayerViews](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/) in the * [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/). In order to use this, a layer must already have an * associated [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) and have its * [FeatureLayer.popupEnabled](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#popupEnabled). * * @param screenPoint - An object representing a point on the screen. * @param options - The [options](https://developers.arcgis.com/javascript/latest/references/core/popup/types/#FetchFeaturesOptions) * to pass into the `fetchFeatures` method. * @returns Resolves with the selected `hitTest` location. In addition, it also returns an array of [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) if the `hitTest` is * performed directly on the [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/), a single Promise containing an array of all resulting * [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/), or an array of objects containing this array of resulting [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) in addition to its associated * [LayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/). * @internal */ fetchFeatures(screenPoint: ScreenPoint | null | undefined, options?: FetchFeaturesOptions): Promise; /** * Selects the feature at the next index in relation to the selected feature. * * @internal * @see [selectedFeatureIndex](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#selectedFeatureIndex) */ next(): Features; /** * Selects the feature at the previous index in relation to the selected feature. * * @internal * @see [selectedFeatureIndex](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#selectedFeatureIndex) */ previous(): Features; /** * Sets the view to a given target. If [goToOverride](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#goToOverride) is set, `goToOverride()` will be called with the current view and specified `params`. * Otherwise, the view will be set using the provided `params`. * * @param params - The parameters to pass to the `zoomTo()` method. * @returns A promise that resolves when the view's extent updates to the value defined in `params.target`. * @internal * @see [MapView.goTo()](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#goTo) or [SceneView.goTo()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#goTo) */ zoomTo(params: GoToParameters): Promise; } declare const FeaturesSuperclass: typeof EventedAccessor & typeof GoTo