Manages the viewing and editing of a Popup. More...
Import Statement: | import Esri.ArcGISRuntime 100.15 |
Since: | Esri.ArcGISRuntime 100.0 |
Inherits: |
Properties
- attachmentManager : PopupAttachmentManager
- customHtmlDescription : string
- deleteAllowed : bool
- displayedFields : PopupAttributeListModel
- editGeometryAllowed : bool
- editSummary : string
- editableFields : PopupAttributeListModel
- editing : bool
- editingAllowed : bool
- editingError : Error
- editingGeometryBuilder : GeometryBuilder
- evaluateExpressionsResults : list<PopupExpressionEvaluation>
- evaluateExpressionsStatus : Enums.TaskStatus
- evaluatedElements : list<PopupElement>
- featureTypes : list<FeatureType>
- geoElementContingencyValidationErrors : jsobject
- geoElementContingencyValidationWarnings : jsobject
- geoElementValid : bool
- geoElementWarnings : jsobject
- popup : Popup
- showAttachments : bool
- showCustomHtmlDescription : bool
- showEditSummary : bool
- showMedia : bool
- symbol : Symbol
- title : string
Signals
- attachmentManagerChanged()
- customHtmlDescriptionChanged()
- deleteAllowedChanged()
- editGeometryAllowedChanged()
- editSummaryChanged()
- editingAllowedChanged()
- editingChanged()
- editingCompleted()
- editingErrorChanged()
- editingGeometryBuilderChanged()
- evaluateExpressionsStatusChanged()
- evaluatedElementsChanged()
- featureTypeChanged()
- featureTypesChanged()
- geoElementContingencyValidationErrorsChanged()
- geoElementContingencyValidationWarningsChanged()
- geoElementValidChanged()
- geoElementWarningsChanged()
- geometryBuilderRequired()
- popupChanged()
- showAttachmentsChanged()
- showCustomHtmlDescriptionChanged()
- showEditSummaryChanged()
- showMediaChanged()
- symbolChanged()
- titleChanged()
Methods
- void cancelEditing()
- bool cancelTask(string taskId)
- jsobject contingencyValidationErrors()
- jsobject contingencyValidationWarnings()
- ContingentValuesResult contingentValuesForField(PopupField field)
- bool doesChangeRequireNotification(FeatureTemplate featureTemplate)
- Domain domain(PopupField popupField)
- string evaluateExpressions()
- PopupField fieldByName(string fieldName)
- string fieldLabel(PopupField popupField)
- Enums.FieldType fieldType(PopupField popupField)
- var fieldValue(string fieldName, PopupElement popupElement)
- var fieldValue(PopupField popupField)
- void finishEditingAsync()
- string formattedValue(PopupField popupField)
- bool isFeatureType(PopupField popupField)
- bool isFieldInFieldGroup(PopupField popupField)
- bool isNullable(PopupField popupField)
- int maxLength(PopupField popupField)
- Error rangeDomainValidationText(PopupField popupField)
- bool startEditing()
- string substitute(string templateString)
- Error updateValue(var newValue, PopupField popupField)
- Error updateValueFromTemplate(FeatureTemplate featureTemplate, Enums.FeatureTypeChangeMode changeMode)
- Error validationError(PopupField popupField)
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.
Type | Default Property |
---|---|
Popup | popup |
GeometryBuilder | editingGeometryBuilder |
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.
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.
Returns whether deleting the GeoElement is allowed (read-only).
displayedFields : PopupAttributeListModel |
Returns the fields for display use as a PopupAttributeListModel (read-only).
editableFields : PopupAttributeListModel |
Returns the editable fields as a PopupAttributeListModel (read-only).
Returns whether the PopupManager is currently in editing mode (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.
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.
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.
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.
Returns whether the GeoElement is valid (read-only).
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.
[default] popup : Popup |
The Popup that is to be managed.
Note: This must be set in order to instantiate a PopupManager.
Returns whether the custom HTML description should be shown (read-only).
symbol : Symbol |
Returns the Symbol of the Popup (read-only).
Signal Documentation
Emitted when the attachmentManager property changes.
Note: The corresponding handler is onAttachmentManagerChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.1.
Emitted when the customHtmlDescription property changes.
Note: The corresponding handler is onCustomHtmlDescriptionChanged
.
Emitted when the deleteAllowed property changes.
Note: The corresponding handler is onDeleteAllowedChanged
.
Emitted when the editGeometryAllowed property changes.
Note: The corresponding handler is onEditGeometryAllowedChanged
.
Emitted when the editSummary property changes.
Note: The corresponding handler is onEditSummaryChanged
.
Emitted when the editingAllowed property changes.
Note: The corresponding handler is onEditingAllowedChanged
.
Emitted when the editing property changes.
Note: The corresponding handler is onEditingChanged
.
Emitted finishEditingAsync completes.
Note: The corresponding handler is onEditingCompleted
.
Emitted when the editingError property changes.
Note: The corresponding handler is onEditingErrorChanged
.
Emitted when the editingGeometryBuilder property changes.
Note: The corresponding handler is onEditingGeometryBuilderChanged
.
Emitted when the evaluateExpressions property changes.
Note: The corresponding handler is onEvaluateExpressionsStatusChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.8.
Signal emitted when the evaluatedElements property changes.
Note: The corresponding handler is onEvaluatedElementsChanged
.
Emitted when the featureTypes property changes.
Note: The corresponding handler is onFeatureTypeChanged
.
Emitted when the featureTypes property changes.
Note: The corresponding handler is onFeatureTypesChanged
.
Signal emitted when the geoelement contingency validation errors change.
Note: The corresponding handler is onGeoElementContingencyValidationErrorsChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.14.
Signal emitted when the geoelement contingency validation warnings changed.
Note: The corresponding handler is onGeoElementContingencyValidationWarningsChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.14.
Emitted when the geoElementValid property changes.
Note: The corresponding handler is onGeoElementValidChanged
.
Signal emitted when the geoelement validation warnings change.
Note: The corresponding handler is onGeoElementWarningsChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.14.
Emitted when the editingGeometryBuilder property changes.
Note: The corresponding handler is onGeometryBuilderRequired
.
Emitted when the popup property changes.
Note: The corresponding handler is onPopupChanged
.
Emitted when the showAttachments property changes.
Note: The corresponding handler is onShowAttachmentsChanged
.
Emitted when the showCustomHtmlDescription property changes.
Note: The corresponding handler is onShowCustomHtmlDescriptionChanged
.
Emitted when the showEditSummary property changes.
Note: The corresponding handler is onShowEditSummaryChanged
.
Emitted when the showMedia property changes.
Note: The corresponding handler is onShowMediaChanged
.
Emitted when the symbol property changes.
Note: The corresponding handler is onSymbolChanged
.
Emitted when the title property changes.
Note: The corresponding handler is onTitleChanged
.
Method Documentation
Cancels the editing session.
Any edits that have been made since starting will be discarded.
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.
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.
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.
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)
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.
Initiates an editing session with the Popup.
Returns true
if editing was started successfully and false
if editing is already started or not allowed.
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.