PopupDefinition
and a GeoElement
, which
allows a visual representation of the GeoElement's attributes as well as the ability
to edit them.- Since:
- 100.0.0
-
Constructor Summary
ConstructorDescriptionPopup
(GeoElement geoElement) Creates a new popup from aGeoElement
.Popup
(GeoElement geoElement, PopupDefinition popupDefinition) Creates a new popup from aGeoElement
andPopupDefinition
. -
Method Summary
Modifier and TypeMethodDescriptionAsynchronously evaluates all expressions available atPopupDefinition.getExpressions()
or atExpressionPopupElement.getPopupExpression()
.Gets the description of the Popup.Gets an unmodifiable list ofPopupElement
objects evaluated asynchronously byevaluateExpressionsAsync()
.getFormattedValue
(PopupField popupField) Gets the formatted value of the popup field.Gets theGeoElement
of the pop-up.Gets the popup definition associated with the popup.Gets the symbol of the Popup.getTitle()
Gets the title of the Popup.
-
Constructor Details
-
Popup
Creates a new popup from aGeoElement
. This method creates a defaultPopupDefinition
with default properties and default popup elements based on the givenGeoElement
.- Parameters:
geoElement
- theGeoElement
for the popup, such as aFeature
orGraphic
- Throws:
IllegalArgumentException
- if geoElement is null- Since:
- 100.0.0
-
Popup
Creates a new popup from aGeoElement
andPopupDefinition
.If the
PopupDefinition
is null, a new one will be created based off the attributes of theGeoElement
.- Parameters:
geoElement
- theGeoElement
for the popup, such as aFeature
orGraphic
popupDefinition
- the PopupDefinition- Throws:
IllegalArgumentException
- if geoElement is null- Since:
- 100.0.0
-
-
Method Details
-
getPopupDefinition
Gets the popup definition associated with the popup.- Returns:
- the popup definition associated with the popup
- Since:
- 100.0.0
-
getGeoElement
Gets theGeoElement
of the pop-up.- Returns:
- the
GeoElement
of the pop-up - Since:
- 100.0.0
-
getTitle
Gets the title of the Popup.- Returns:
- the title of the Popup
- Since:
- 100.0.0
-
getDescription
Gets the description of the Popup.- Returns:
- the description of the Popup
- Since:
- 100.0.0
-
getSymbol
Gets the symbol of the Popup.- Returns:
- the symbol of the Popup
- Since:
- 100.0.0
-
getFormattedValue
Gets the formatted value of the popup field.Dates/times are returned in the local timezone. If
PopupDefinition.getExpressions()
is not empty, then it is possible that thePopupField
may be using expressions with Arcade FeatureSets functions. UseevaluateExpressionsAsync()
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 or "0.00" if the return type isPopupExpression.ReturnType.NUMBER
.If the field is part of a
CodedValueDomain
, theCodedValue.getName()
is returned.- Parameters:
popupField
- the popup field- Returns:
- the formatted string representing the value of the popup field.
- Since:
- 100.3.0
-
evaluateExpressionsAsync
Asynchronously evaluates all expressions available atPopupDefinition.getExpressions()
or atExpressionPopupElement.getPopupExpression()
. The expression can include Arcade FeatureSet functions, which need to be evaluated asynchronously.Also populates the
getEvaluatedElements()
from thePopupDefinition.getElements()
. During the evaluation, eachExpressionPopupElement
is replaced by thePopupElement
returned by the Arcade expression and each placeholder is replaced by its value.This method must be called before displaying the popup information in a UI so you can use synchronous methods
getFormattedValue(PopupField)
andsubstitute(String)
to get the formattedString
representation. If there are noPopupDefinition.getExpressions()
and no popup elements of typeExpressionPopupElement
then the result array will be empty.The
PopupExpression
may be used in thePopupDefinition.getFields()
,PopupDefinition.getMedia()
,PopupDefinition.getTitle()
andPopupDefinition.getDescription()
.- Returns:
- a
ListenableFuture
that contains an array ofPopupExpressionEvaluation
- Since:
- 100.8.0
-
getEvaluatedElements
Gets an unmodifiable list ofPopupElement
objects evaluated asynchronously byevaluateExpressionsAsync()
. During the evaluation, eachExpressionPopupElement
is replaced by thePopupElement
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 bygetFormattedValue(PopupField)
}.The list is empty while
evaluateExpressionsAsync()
has not been executed, and is cleared ifevaluateExpressionsAsync()
is executed more than once. After evaluation, the order of the popup elements in the list matches the order elements present inPopupDefinition.getElements()
and shown in the pop-up window. If anExpressionPopupElement
fails to be evaluated, then it will be skipped in the list. Use the array ofPopupExpressionEvaluation
returned fromevaluateExpressionsAsync()
to learn the cause of the error.- Returns:
- an unmodifiable list of
PopupElement
evaluated asynchronously byevaluateExpressionsAsync()
. During the evaluation, eachExpressionPopupElement
is replaced by thePopupElement
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 bygetFormattedValue(PopupField)
. - Since:
- 100.14.0
- See Also:
-