Popup

class Popup

Represents a pop-up which is basically a pair (GeoElement, PopupDefinition).

Since

200.1.0

Constructors

Link copied to clipboard
constructor(geoElement: GeoElement, popupDefinition: PopupDefinition? = null)

Creates a new popup from a geo element and a popup definition. If the popup definition is null, a default one will be created from the geo element.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

A ListImpl of PopupElement objects evaluated asynchronously by Popup.evaluateExpressions(). During the evaluation, each ExpressionPopupElement is replaced by the PopupElement returned by the Arcade expression and each placeholder is replaced by its value. If the Arcade expression returns a list of attributes to be used by the popup element, these attributes will be used by Popup.getFormattedValue(PopupField). The array is empty while Popup.evaluateExpressions() has not been executed, and is cleared if Popup.evaluateExpressions() is executed more than once. After evaluation, the order of the popup elements in the ListImpl matches the order elements present in PopupDefinition.elements and shown in the pop-up window. If an ExpressionPopupElement fails to be evaluated, then it will be skipped in the ListImpl. Use the array of PopupExpressionEvaluation returned from Popup.evaluateExpressions() to learn the cause of the error.

Link copied to clipboard

The GeoElement of the pop-up.

Link copied to clipboard

The popup definition associated with the popup.

Link copied to clipboard

The popup symbol.

Link copied to clipboard

The popup title.

Functions

Link copied to clipboard

Asynchronously evaluates all expressions available at PopupDefinition.expressions or at ExpressionPopupElement.popupExpression. The expression can include Arcade FeatureSet functions, which need to be evaluated asynchronously.

Link copied to clipboard

Gets the formatted value of the popup field. Dates and times are returned in the local timezone. If PopupDefinition.expressions is not empty then the PopupField may be using expressions with Arcade FeatureSet functions. Use Popup.evaluateExpressions() to evaluate the Arcade expressions before trying to get the formatted String representation of the popup field's value, otherwise it may return an empty string.