Types
import type { PopupAction, PopupPositionResult, PopupPositionVariable, PopupPositionValue, Alignment } from "@arcgis/core/widgets/Popup/types.js";

Type definitions

PopupAction

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

PopupPositionResult

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Type
"top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right"

PopupPositionVariable

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Type
"auto" | "top-leading" | "top-trailing" | "bottom-leading" | "bottom-trailing"

PopupPositionValue

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Alignment

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

PopupDockPosition

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

ActionEvent

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

action

Property
Type
PopupAction
Since
ArcGIS Maps SDK for JavaScript 5.0

The action clicked by the user. For a description of this object and a specification of its properties, see the Popup.actions property of this class.

DockOptionsBreakpoint

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

width

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The maximum width of the View at which the popup will be set to dockEnabled automatically.

Default value
544

height

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The maximum height of the View at which the popup will be set to dockEnabled automatically.

Default value
544

DockOptions

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

buttonEnabled

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

If true, displays the dock button. If false, hides the dock button from the popup.

position

Property
Type
PopupDockPosition | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The position in the view at which to dock the popup. Can be set as either a string or function. See the table below for known string values and their position in the view based on the view's size.

Known ValueView size > breakpointView size < breakpoint (at xsmall view breakpoint)
autotop-righttop-right
top-lefttop-lefttop-left
top-centertop-centertop 100%
top-righttop-righttop right
bottom-leftbottom-leftbottom left
bottom-centerbottom-centerbottom 100%
bottom-rightbottom-rightbottom right

If viewing the popup in a mobile UI, the default dock position is bottom 100%.

Default value
auto

breakpoint

Property
Type
DockOptionsBreakpoint | boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Defines the dimensions of the View at which to dock the popup. Set to false to disable docking at a breakpoint.

Default value
true

InitialDisplayOptions

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Type
"list" | "feature"

PopupOpenOptions

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

actions

Property
Type
Collection<PopupAction> | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

This property allows you to specify a collection of actions to the action bar when the Features widget opens.

content

Property
Type
any | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Sets the Popup.content of the popup.

collapsed

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates whether the widget displays its content. If true, only the header displays.

Default value
false

features

Property
Type
Graphic[] | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Sets the popup's Popup.features, which populate the title and content of the popup based on each graphic's PopupTemplate.

featureMenuOpen

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

This property enables multiple features in a popup to display in a list rather than displaying the first selected feature. Setting this to true allows the user to scroll through the list of features. This value will only be honored if PopupViewModel.initialDisplayMode is set to feature.

Default value
false

featureMenuTitle

Property
Type
string | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Sets the title to display on the widget while viewing the feature menu.

fetchFeatures

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

When true, indicates the the content of this feature should be fetched and displayed. If no PopupTemplate exists, a default template is created for the layer if Popup.defaultPopupTemplateEnabled = true. In order for this option to work, there must be a valid view and location set.

Default value
false

location

Property
Type
Point | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Sets the popup's Popup.location, which is the geometry used to position the popup.

promises

Property
Type
Promise<any>[] | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Sets pending Popup.promises on the popup. The popup will display once the promises resolve. Each promise must resolve to an array of Graphics.

title

Property
Type
string | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Sets the Popup.title of the popup.

updateLocationEnabled

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

When true, indicates the popup should update its Popup.location for each paginated feature based on the selectedFeature's geometry.

Default value
false

shouldFocus

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

When true, indicates that the focus should be on the popup after it has been opened.

Default value
false

State

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Type
"disabled" | "ready"

FetchFeaturesOptions

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Optional properties to use with the Features.fetchFeatures() and Popup.fetchFeatures() methods.

Supertypes
AbortOptions

event

Property
Type
ClickEvent | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The click event for either the MapView or SceneView. The event can be supplied in order to adjust the query radius depending on the pointer type. For example, touch events query a larger radius.