PopupManager QML Type

Manages the viewing and editing of a Popup. More...

Import Statement: import Esri.ArcGISRuntime 100.15
Since: Esri.ArcGISRuntime 100.0
Inherits:

Object

Properties

Signals

Methods

Detailed Description

This class works in conjunction with the PopupView in the ArcGIS Runtime Toolkit. The PopupView is used to display information about a GeoElement. For example, a PopupView could be used to display the attributes of an ArcGISFeature that is stored in a Feature Service. PopupManager provides the PopupView with the content to display in the view. It also contains many helper functions and properties to assist the PopupView with displaying and editing information related to the associated GeoElement.

An example workflow for displaying a PopupView using a PopupManager would be:

  • Declare a PopupView and anchor it to a desired location.
  • Perform an identify operation on a GeoView and select a Feature from the identify result.
  • Create a Popup from the Feature.
  • Optionally obtain the Popup's PopupDefinition and set the title, whether to show attachments, and so on.
  • Create a PopupManager from the Popup.
  • Assign the PopupView's popupManager property the PopupManager created in the previous step.
  • Call the show() method to display the PopupView.
  • Call the dismiss() method to hide the PopupView.

This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.

Note: Each time a change is made to the Popup, PopupDefinition, PopupManager, or any of their properties, the PopupManager must be re-set to the PopupView.

Property Documentation

attachmentManager : PopupAttachmentManager

Returns the PopupAttachmentManager for this PopupManager (read-only).

Returns null if there is no associated PopupAttachmentManager.

This property was introduced in Esri.ArcGISRuntime 100.1.


customHtmlDescription : string

Returns the Popup's custom HTML description (read-only).

If PopupDefinition::expressions is not empty, the custom HTML description may be using expressions with Arcade FeatureSet functions. Use PopupManager::evaluateExpressions() to evaluate the Arcade expressions before trying to get the customHtmlDescription, otherwise it may not return the correct description.


deleteAllowed : bool

Returns whether deleting the GeoElement is allowed (read-only).


displayedFields : PopupAttributeListModel

Returns the fields for display use as a PopupAttributeListModel (read-only).


editGeometryAllowed : bool

Returns whether geometry editing is allowed (read-only).


editSummary : string

Returns the current edit summary (read-only).


editableFields : PopupAttributeListModel

Returns the editable fields as a PopupAttributeListModel (read-only).


editing : bool

Returns whether the PopupManager is currently in editing mode (read-only).


editingAllowed : bool

Returns whether attribute editing is allowed (read-only).


editingError : Error

The Error object for when an editing error occurs (read-only).

The editingErrorChanged signal will emit when there is a new error.


[default] editingGeometryBuilder : GeometryBuilder

The GeometryBuilder used to edit the GeoElement's geometry.


evaluateExpressionsResults : list<PopupExpressionEvaluation>

Returns a list of results from an evaluate of expressions operation.

The results are asynchronously evaluated expressions, including Arcade FeatureSet functions, available at PopupDefinition::expressions. If there are no PopupDefinition::expressions then the result list will be empty.

Obtain the results once the evaluateExpressionsStatusChanged signal emits, and the evaluateExpressionsStatus is complete.

This property was introduced in Esri.ArcGISRuntime 100.8.


evaluateExpressionsStatus : Enums.TaskStatus

The status for the task of evaluating popup expressions.

This property was introduced in Esri.ArcGISRuntime 100.8.

See also Enums.TaskStatus.


evaluatedElements : list<PopupElement>

A list of PopupElement objects evaluated asynchronously by evaluateExpressions. During the evaluation, the ExpressionPopupElement are replaced by the PopupElement returned by the arcade expression. If the Arcade expression returns a list of attributes to use by the pop-up element, these attributes will be used by formattedValue(PopupField) or fieldValue(PopupField) (read-only).

The list is empty while evaluateExpressions has not been executed and is cleared if evaluateExpressions is executed more than once. After evaluation, the order of the PopupElement in the list is the order that elements are in the PopupDefinition::elements and are shown in the pop-up window. If an ExpressionPopupElement is failed to be evaluated, it will be skipped in the list. The error can be found in the list of PopupExpressionEvaluation returned from evaluateExpressions.

This property was introduced in Esri.ArcGISRuntime 100.14.

See also PopupDefinition::elements and evaluateExpressions.


featureTypes : list<FeatureType>

Returns a list of FeatureTypes (read-only), or an empty list if the GeoElement is not an ArcGISFeature in an ArcGISFeatureTable.


geoElementContingencyValidationErrors : jsobject

The QVariantMap error object (read-only).

The geoElementContingencyValidationErrorsChanged signal will emit when there are new geoelement contingency validation errors.

This property was introduced in Esri.ArcGISRuntime 100.14.


geoElementContingencyValidationWarnings : jsobject

The QVariantMap error object (read-only).

The geoElementContingencyValidationWarningsChanged signal will emit when there are new geoelement contingency validation warnings.

This property was introduced in Esri.ArcGISRuntime 100.14.


geoElementValid : bool

Returns whether the GeoElement is valid (read-only).


geoElementWarnings : jsobject

The QVariantMap error object (read-only).

The geoElementWarningsChanged signal will emit when there are new geoelement warnings.

This property was introduced in Esri.ArcGISRuntime 100.14.


The Popup that is to be managed.

Note: This must be set in order to instantiate a PopupManager.


showAttachments : bool

Returns whether attachments should be shown (read-only).


showCustomHtmlDescription : bool

Returns whether the custom HTML description should be shown (read-only).


showEditSummary : bool

Returns whether the showEditSummary should be shown (read-only).


showMedia : bool

Returns whether media should be shown (read-only).


symbol : Symbol

Returns the Symbol of the Popup (read-only).


title : string

Returns the popup's custom HTML title text (read-only).


Signal Documentation

attachmentManagerChanged()

Emitted when the attachmentManager property changes.

Note: The corresponding handler is onAttachmentManagerChanged.

This signal was introduced in Esri.ArcGISRuntime 100.1.


customHtmlDescriptionChanged()

Emitted when the customHtmlDescription property changes.

Note: The corresponding handler is onCustomHtmlDescriptionChanged.


deleteAllowedChanged()

Emitted when the deleteAllowed property changes.

Note: The corresponding handler is onDeleteAllowedChanged.


editGeometryAllowedChanged()

Emitted when the editGeometryAllowed property changes.

Note: The corresponding handler is onEditGeometryAllowedChanged.


editSummaryChanged()

Emitted when the editSummary property changes.

Note: The corresponding handler is onEditSummaryChanged.


editingAllowedChanged()

Emitted when the editingAllowed property changes.

Note: The corresponding handler is onEditingAllowedChanged.


editingChanged()

Emitted when the editing property changes.

Note: The corresponding handler is onEditingChanged.


editingCompleted()

Emitted finishEditingAsync completes.

Note: The corresponding handler is onEditingCompleted.


editingErrorChanged()

Emitted when the editingError property changes.

Note: The corresponding handler is onEditingErrorChanged.


editingGeometryBuilderChanged()

Emitted when the editingGeometryBuilder property changes.

Note: The corresponding handler is onEditingGeometryBuilderChanged.


evaluateExpressionsStatusChanged()

Emitted when the evaluateExpressions property changes.

Note: The corresponding handler is onEvaluateExpressionsStatusChanged.

This signal was introduced in Esri.ArcGISRuntime 100.8.


evaluatedElementsChanged()

Signal emitted when the evaluatedElements property changes.

Note: The corresponding handler is onEvaluatedElementsChanged.


featureTypeChanged()

Emitted when the featureTypes property changes.

Note: The corresponding handler is onFeatureTypeChanged.


featureTypesChanged()

Emitted when the featureTypes property changes.

Note: The corresponding handler is onFeatureTypesChanged.


geoElementContingencyValidationErrorsChanged()

Signal emitted when the geoelement contingency validation errors change.

Note: The corresponding handler is onGeoElementContingencyValidationErrorsChanged.

This signal was introduced in Esri.ArcGISRuntime 100.14.


geoElementContingencyValidationWarningsChanged()

Signal emitted when the geoelement contingency validation warnings changed.

Note: The corresponding handler is onGeoElementContingencyValidationWarningsChanged.

This signal was introduced in Esri.ArcGISRuntime 100.14.


geoElementValidChanged()

Emitted when the geoElementValid property changes.

Note: The corresponding handler is onGeoElementValidChanged.


geoElementWarningsChanged()

Signal emitted when the geoelement validation warnings change.

Note: The corresponding handler is onGeoElementWarningsChanged.

This signal was introduced in Esri.ArcGISRuntime 100.14.


geometryBuilderRequired()

Emitted when the editingGeometryBuilder property changes.

Note: The corresponding handler is onGeometryBuilderRequired.


popupChanged()

Emitted when the popup property changes.

Note: The corresponding handler is onPopupChanged.


showAttachmentsChanged()

Emitted when the showAttachments property changes.

Note: The corresponding handler is onShowAttachmentsChanged.


showCustomHtmlDescriptionChanged()

Emitted when the showCustomHtmlDescription property changes.

Note: The corresponding handler is onShowCustomHtmlDescriptionChanged.


showEditSummaryChanged()

Emitted when the showEditSummary property changes.

Note: The corresponding handler is onShowEditSummaryChanged.


showMediaChanged()

Emitted when the showMedia property changes.

Note: The corresponding handler is onShowMediaChanged.


symbolChanged()

Emitted when the symbol property changes.

Note: The corresponding handler is onSymbolChanged.


titleChanged()

Emitted when the title property changes.

Note: The corresponding handler is onTitleChanged.


Method Documentation

void cancelEditing()

Cancels the editing session.

Any edits that have been made since starting will be discarded.


bool cancelTask(string taskId)

Cancel the task with the ID taskId.

Returns false if the task cannot be canceled or there is no task with the specified id taskId.

See also Cancelable.


jsobject contingencyValidationErrors()

Returns one or more field group names, and for each field group name, an associated contingent-value validation error.

Errors are reported in validation when editing is defined as restrictive in the FieldGroup.

This method was introduced in Esri::ArcGISRuntime 100.14.


jsobject contingencyValidationWarnings()

Returns one or more field group names, and for each field group name, an associated contingent-value validation warning.

Warnings are reported in validation when editing is defined as non-restrictive in the FieldGroup.

This method was introduced in Esri::ArcGISRuntime 100.14.


ContingentValuesResult contingentValuesForField(PopupField field)

The returned result contains values for each FieldGroup and the field it belongs to. Multiple values are returned if the specified field belongs to multiple groups.

This method was introduced in Esri::ArcGISRuntime 100.14.


bool doesChangeRequireNotification(FeatureTemplate featureTemplate)

Returns whether changes to the specified featureTemplate requires a notification to the user that some data may be overwritten by the change.


Domain domain(PopupField popupField)

Returns the Domain of the specified popupField.


string evaluateExpressions()

Asynchronously evaluates all expressions, including Arcade FeatureSet functions, available at PopupDefinition::expressions. This method must be called before displaying the popup information in a UI so you can use synchronous methods Popup::formattedValue() and PopupManager::substitute() to get the formatted string representation. If there are no PopupDefinition::expressions then the result list will be empty.

The PopupExpression may be used in the PopupDefinition::fields, PopupDefinition::media, PopupDefinition::title and PopupDefinition::description.

This method was introduced in Esri.ArcGISRuntime 100.8.


PopupField fieldByName(string fieldName)

Returns the PopupField object corresponding to the specified fieldName.

This will return null if there is no such field or if the GeoElement is not an ArcGISFeature with fields.


string fieldLabel(PopupField popupField)

Returns the label of the specified popupField.

If the field is based on a PopupExpression, the title of the expression will be returned.

This method was introduced in Esri.ArcGISRuntime 100.3.


Enums.FieldType fieldType(PopupField popupField)

Returns the Enums.FieldType of the specified popupField.

See also Enums.FieldType.


var fieldValue(string fieldName, PopupElement popupElement)

Returns the attribute value for the field specified by a name.

  • fieldName - The name of the field.
  • popupElement - The pop-up element to look up for the field. This argument is useful only if the pop-up element is coming from an Arcade expression evaluation that can return a list of attributes (see evaluatedElements).

If any field is using expressions, use evaluateExpressions to evaluate the Arcade expressions before trying to get the fields' values. Otherwise, the values may not be evaluated properly.

If the field is part of a CodedValueDomain, the CodedValue::code is returned (unlike formattedValue(PopupField), which returns the CodedValue::name).

This method was introduced in Esri.ArcGISRuntime 100.14.


var fieldValue(PopupField popupField)

Returns the value of the specified popupField.

If the field is part of a CodedValueDomain, the CodedValue::code is returned (unlike PopupManager::formattedValue, which returns the CodedValue::name)


void finishEditingAsync()

Finishes the editing session.

This runs asynchronously, and the editingCompleted signal emits once the editing session has ended.

Note: The PopupManager does not automatically call applyEdits on the associated GeoElement's ServiceFeatureTable. To commit any edits to the source data, call applyEdits on the associated ServiceFeatureTable.


string formattedValue(PopupField popupField)

Returns a formatted string representation of the specified popupField.

If PopupDefinition::expressions is not empty, the PopupField may be using expressions with Arcade FeatureSet functions. Use PopupManager::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.

If the field is part of a CodedValueDomain, the CodedValue::name is returned.


bool isFeatureType(PopupField popupField)

Returns whether the specified popupField is a FeatureType field.


bool isFieldInFieldGroup(PopupField popupField)

Returns whether the given popupField is part of a FieldGroup as defined in a ContingentValuesDefinition.

This method was introduced in Esri::ArcGISRuntime 100.14.


bool isNullable(PopupField popupField)

Returns whether the specified popupField is nullable.


int maxLength(PopupField popupField)

Returns the maximum allowed length of the specified popupField.


Error rangeDomainValidationText(PopupField popupField)

Returns a string that can be used to hint the acceptable values for a RangeDomain in a popupField.


bool startEditing()

Initiates an editing session with the Popup.

Returns true if editing was started successfully and false if editing is already started or not allowed.


string substitute(string templateString)

Substitutes attribute values for attribute place-holders in a given templateString.

If PopupDefinition::expressions is not empty, the input string may be using expressions with Arcade FeatureSet functions. Use PopupManager::evaluateExpressions() to evaluate the Arcade expressions before trying to get the substitute string, otherwise it may return an empty string.


Error updateValue(var newValue, PopupField popupField)

Updates the value of the specified popupField to the specified newValue.


Error updateValueFromTemplate(FeatureTemplate featureTemplate, Enums.FeatureTypeChangeMode changeMode)

Updates the GeoElement's featureTemplate, which in turn updates the values of its attribute table to match those in the feature template, dependent on the changeMode.


Error validationError(PopupField popupField)

Returns the validation Error for the specified popupField.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.