[explicit]
Popup::Popup(Esri::ArcGISRuntime::GeoElement *geoElement, QObject *parent = nullptr)
Creates a new popup from a GeoElement.
This method creates a default PopupDefinition with default properties and default popup elements based on the given GeoElement.
Creates a new popup from a geo element and a popup definition.
If the popup definition is nullptr
, a default one will be created from the geo element.
{GeoView::identifyLayersAsync(const QPointF&, double, bool, QObject*)}
See also Esri::ArcGISRuntime::GeoView::identifyLayersAsync(const QPointF&, double, bool, QObject*).
[override virtual noexcept]
Popup::~Popup()
Destructor.
[since Esri::ArcGISRuntime 200.2]
QFuture<QList<Esri::ArcGISRuntime::PopupExpressionEvaluation *>> Popup::evaluateExpressionsAsync(QObject *parent = nullptr)
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.
Also populates the evaluatedElements from the PopupDefinition::elements. During the evaluation, each ExpressionPopupElement is replaced by the PopupElement 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 formattedValue(Esri::ArcGISRuntime::PopupField*) and Esri::ArcGISRuntime::PopupManager::substitute(const QString&) to get the formatted QString representation.
If there are no PopupDefinition::expressions and no popup elements of type ExpressionPopupElement then the result array will be empty.
The PopupExpression may be used in the PopupDefinition::fields, PopupDefinition::media, PopupDefinition::title and PopupDefinition::description.
This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.
See Working with QFuture for further details.
This function was introduced in Esri::ArcGISRuntime 200.2.
[since Esri::ArcGISRuntime 100.14]
QList<Esri::ArcGISRuntime::PopupElement *> Popup::evaluatedElements() const
Returns a QList of PopupElement objects evaluated asynchronously by evaluateExpressionsAsync.
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 formattedValue(Esri::ArcGISRuntime::PopupField*).
The list is empty while evaluateExpressionsAsync has not been executed, and is cleared if evaluateExpressionsAsync is executed more than once.
After evaluation, the order of the pop-up elements in the QList 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 QList. Use the list of PopupExpressionEvaluation returned from evaluateExpressionsAsync to learn the cause of the error.
This function was introduced in Esri::ArcGISRuntime 100.14.
See also PopupDefinition::elements and evaluateExpressionsAsync.
QString Popup::formattedValue(Esri::ArcGISRuntime::PopupField *popupField) constReturns 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 evaluateExpressionsAsync to evaluate the Arcade expressions before trying to get the formatted QString 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.
Esri::ArcGISRuntime::GeoElement *Popup::geoElement() constReturns the GeoElement of this Popup.
Esri::ArcGISRuntime::PopupDefinition *Popup::popupDefinition() constReturns the PopupDefinition of this Popup.
[since Esri::ArcGISRuntime 200.7]
void Popup::setUserInput(const Esri::ArcGISRuntime::Geometry &userInput)
Sets the userInput to userInput.
This function was introduced in Esri::ArcGISRuntime 200.7.
See also userInput.
Esri::ArcGISRuntime::Symbol *Popup::symbol() constReturns the Symbol of this Popup.
QString Popup::title() constReturns the title of this Popup.
[since Esri::ArcGISRuntime 200.7]
Esri::ArcGISRuntime::Geometry Popup::userInput() const
Returns the geometry of the click or tap location that invoked the popup.
If Popup expressions reference the variable $userInput, the variable will be replaced by the userInput value. Typically, this represents the map location the user clicked or tapped to launch a popup. This value may be a Point, an Envelope, or perhaps empty (if the popup wasn't opened from map interaction). Therefore, check the geometry type before using it in an Arcade expression. If the Popup is created from a call to an identify method that returns popups, such as GeoView::identifyLayerAsync(Esri::ArcGISRuntime::Layer*, const QPointF&, double, bool, QObject*), the userInput will be automatically initialized with the coordinate where the identify operation began. If the Popup is created manually, a value for this property should be set to ensure that Arcade expressions are evaluated correctly.
This function was introduced in Esri::ArcGISRuntime 200.7.
See also setUserInput().
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4