GeoElement. This class defines how the geoelement will be displayed
 and behave in a pop-up. Pop-up definitions contain information such as:
 - Which attributes of the geoelement should the pop-up display, whether it is editable, how to format numbers and dates, etc.
- Whether the pop-up should show attachments for the geoelement.
- What media, such as charts and images, should be displayed for the geoelement.
- Since:
- 100.0.0
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a new, empty pop-up definition.PopupDefinition(GeoElement geoElement) Creates a new popup definition from aGeoElement.PopupDefinition(PopupSource popupSource) Creates a new popup definition from a popup source.
- 
Method SummaryModifier and TypeMethodDescriptionGets a string that appears in the body of the pop-up as a description.Gets a mutable list ofPopupElementthat represent an ordered list of pop-up elements.Gets a list of PopupExpression objects defining the various Arcade expressions on the pop-up.Gets a list ofPopupFieldobjects defining how each field participates in the pop-up window.getMedia()Gets a list of PopupMedia objects that define images and charts displayed in the pop-up.Gets the related features definition for this pop-up definition.getTitle()Gets a string that appears at the top of the pop-up as a title.booleanChecks if the pop-up allows the geoelement to be deleted.booleanChecks if the pop-up allows the associatedGeoElement's attributes to be edited.booleanChecks if the pop-up allows the associated geoelement's geometry to be edited.booleanChecks if attachments should be loaded for feature layers that have attachments.booleanChecks if the pop-up should display the edit summary of the associated geoelement.voidsetAllowDelete(boolean allowDelete) Sets whether or not the pop-up allows the geoelement to be deleted.voidsetAllowEdit(boolean allowEdit) Sets whether or not the pop-up allows the associated geoelement's attributes to be edited.voidsetAllowEditGeometry(boolean allowEditGeometry) Sets whether or not the pop-up allows the associated geoelement's geometry to be edited.voidsetDescription(String description) Sets a string that appears in the body of the pop-up as a description.voidsetRelatedFeaturesDefinition(PopupRelatedFeaturesDefinition popupRelatedFeaturesDefinition) Sets the related features definition for this pop-up definition.voidsetShowAttachments(boolean showAttachments) Sets whether or not attachments should be loaded for feature layers that have attachments.voidsetShowEditSummary(boolean showEditSummary) Sets whether the pop-up should display the edit summary of the associated geoelement.voidSets a string that appears at the top of the pop-up as a title.
- 
Constructor Details- 
PopupDefinitionpublic PopupDefinition()Creates a new, empty pop-up definition. Use this object to define the look and feel of pop-up windows when users click or query a feature.- Since:
- 100.0.0
 
- 
PopupDefinitionCreates a new popup definition from aGeoElement.This creates a new popup definition with default properties and default popup elements based on the geoelement fields. Use this object to define the look and feel of pop-up windows when users click or query a feature. - Parameters:
- geoElement- the geoelement for the popup, such as a- Featureor- Graphic
- Throws:
- IllegalArgumentException- if the geoElement is null
- Since:
- 100.0.0
- See Also:
 
- 
PopupDefinitionCreates a new popup definition from a popup source.This creates a new popup definition with default properties and default popup elements based on the popup source fields. Use this object to define the look and feel of pop-up windows when users click or query a feature. - Parameters:
- popupSource- the PopupSource on which to base the pop-up
- Throws:
- IllegalArgumentException- if popupSource is null
- Since:
- 100.0.0
 
 
- 
- 
Method Details- 
getDescriptionGets a string that appears in the body of the pop-up as a description.- Returns:
- the description string
- Since:
- 100.0.0
- See Also:
 
- 
setDescriptionSets a string that appears in the body of the pop-up as a description.The description can contain a literal value, or a placeholder for value from the geoelement's attribute. The placeholder needs to be of the form {field_name}where field_name is a key in the geoelement's attributes- Parameters:
- description- the description string
- Since:
- 100.0.0
- See Also:
 
- 
getTitleGets a string that appears at the top of the pop-up as a title.- Returns:
- the title string
- Since:
- 100.0.0
- See Also:
 
- 
setTitleSets a string that appears at the top of the pop-up as a title.The title can contain a literal value, or a placeholder for value from the geo element's attribute. The placeholder needs to be of the form {field_name}where field_name is a key in the geoelement's attributes.- Parameters:
- title- the title string
- Since:
- 100.0.0
- See Also:
 
- 
isShowAttachmentspublic boolean isShowAttachments()Checks if attachments should be loaded for feature layers that have attachments.- Returns:
- true if attachments should be shown; otherwise false
- Since:
- 100.0.0
- See Also:
 
- 
setShowAttachmentspublic void setShowAttachments(boolean showAttachments) Sets whether or not attachments should be loaded for feature layers that have attachments.- Parameters:
- showAttachments- a boolean indicating whether attachments should be shown
- Since:
- 100.0.0
- See Also:
 
- 
isShowEditSummarypublic boolean isShowEditSummary()Checks if the pop-up should display the edit summary of the associated geoelement.- Returns:
- true if edit summary will be displayed
- Since:
- 100.6.0
- See Also:
 
- 
setShowEditSummarypublic void setShowEditSummary(boolean showEditSummary) Sets whether the pop-up should display the edit summary of the associated geoelement.- Parameters:
- showEditSummary- true if edit summary should be displayed; false otherwise
- Since:
- 100.6.0
- See Also:
 
- 
getFieldsGets a list ofPopupFieldobjects defining how each field participates in the pop-up window.The order of the list is the order that fields are shown in the pop-up window. - Returns:
- a list of PopupField objects
- Since:
- 100.0.0
 
- 
getMediaGets a list of PopupMedia objects that define images and charts displayed in the pop-up.The order of the list is the order that media are shown in the pop-up window. - Returns:
- a list of PopupMedia objects
- Since:
- 100.0.0
 
- 
getExpressionsGets a list of PopupExpression objects defining the various Arcade expressions on the pop-up.- Returns:
- a list of PopupExpression objects
- Since:
- 100.3.0
 
- 
isAllowEditpublic boolean isAllowEdit()Checks if the pop-up allows the associatedGeoElement's attributes to be edited.- Returns:
- true if editing the geoelement's attributes is allowed
- Since:
- 100.0.0
- See Also:
 
- 
setAllowEditpublic void setAllowEdit(boolean allowEdit) Sets whether or not the pop-up allows the associated geoelement's attributes to be edited.- Parameters:
- allowEdit- true to allow editing the geoelement's attributes
- Since:
- 100.0.0
- See Also:
 
- 
isAllowEditGeometrypublic boolean isAllowEditGeometry()Checks if the pop-up allows the associated geoelement's geometry to be edited.- Returns:
- true if editing the geoelement's geometry is allowed
- Since:
- 100.0.0
- See Also:
 
- 
setAllowEditGeometrypublic void setAllowEditGeometry(boolean allowEditGeometry) Sets whether or not the pop-up allows the associated geoelement's geometry to be edited.- Parameters:
- allowEditGeometry- true to allow editing the geoelement's geometry
- Since:
- 100.0.0
- See Also:
 
- 
isAllowDeletepublic boolean isAllowDelete()Checks if the pop-up allows the geoelement to be deleted.- Returns:
- true if deleting the geoelement is allowed
- Since:
- 100.0.0
- See Also:
 
- 
setAllowDeletepublic void setAllowDelete(boolean allowDelete) Sets whether or not the pop-up allows the geoelement to be deleted.- Parameters:
- allowDelete- true to allow deleting the geoelement
- Since:
- 100.0.0
- See Also:
 
- 
getRelatedFeaturesDefinitionGets the related features definition for this pop-up definition.- Returns:
- the pop-up related features definition
- Since:
- 100.1.0
- See Also:
 
- 
setRelatedFeaturesDefinitionpublic void setRelatedFeaturesDefinition(PopupRelatedFeaturesDefinition popupRelatedFeaturesDefinition) Sets the related features definition for this pop-up definition.A definition that dictates whether related features should be displayed in the pop-up and how they should be sorted. - Parameters:
- popupRelatedFeaturesDefinition- the pop-up related features definition to set, can be null
- Since:
- 100.1.0
- See Also:
 
- 
getElementsGets a mutable list ofPopupElementthat represent an ordered list of pop-up elements.The order of the Listis the order that elements are shown in the pop-up window.For backward compatibility with a webmap or webscene created by clients that don't support the popup elements, a few popup elements are created to match the legacy popup style when reading a popup definition without popup elements: - a TextPopupElementifPopupDefinition.getDescription()is not empty
- a FieldsPopupElementifPopupDefinition.getDescription()is empty
- a MediaPopupElementifPopupDefinition.getMedia()is not empty
- an AttachmentsPopupElementifPopupDefinition.isShowAttachments()is true
 - Returns:
- a mutable list of PopupElementthat represent an ordered list of pop-up elements
- Since:
- 100.14.0
 
- a 
 
-