Skip To Content ArcGIS for Developers Sign In Dashboard

Popup Class

class Esri::ArcGISRuntime::Popup

The combination of a PopupDefinition and a GeoElement, which allows a visual representation of the GeoElement's attributes as well as the ability to edit them. More...

Header: #include <Popup>
Since: Esri::ArcGISRuntime 100.0
Inherits: Esri::ArcGISRuntime::Object

This class was introduced in Esri::ArcGISRuntime 100.0.

Public Functions

Popup(Esri::ArcGISRuntime::GeoElement *geoElement, Esri::ArcGISRuntime::PopupDefinition *popupDefinition, QObject *parent = nullptr)
Popup(Esri::ArcGISRuntime::GeoElement *geoElement, QObject *parent = nullptr)
virtual ~Popup() override
Esri::ArcGISRuntime::TaskWatcher evaluateExpressions() const
QString formattedValue(Esri::ArcGISRuntime::PopupField *popupField) const
Esri::ArcGISRuntime::GeoElement *geoElement() const
Esri::ArcGISRuntime::PopupDefinition *popupDefinition() const
Esri::ArcGISRuntime::Symbol *symbol() const
QString title() const

Signals

void evaluateExpressionsCompleted(QUuid taskId, const QList<Esri::ArcGISRuntime::PopupExpressionEvaluation *> &popupExpressionEvaluationResults)

Detailed Description

Use the Popup to create a PopupManager. The PopupManager can then be used in conjunction with the PopupView (from the ArcGIS Runtime Toolkit) for a visual representation of the Popup.

Member Function Documentation

Constructor that takes a geoElement and a popupDefinition with an optional parent.

If you pass in a null PopupDefinition, a default one will be created for you based on the GeoElement's attributes and schema.

Constructor that takes a geoElement with an optional parent.

[signal] void Popup::evaluateExpressionsCompleted(QUuid taskId, const QList<Esri::ArcGISRuntime::PopupExpressionEvaluation *> &popupExpressionEvaluationResults)

Signal emitted after the popup expression evaluation asynchronous method completes.

  • taskId - The task ID of the asynchronous task.
  • popupExpressionEvaluationResults - The generated list of popupExpressionEvaluation results.

The returned PopupExpressionEvaluation objects have the Popup as its parent.

See also Returned QObjects Parenting.

[override virtual] Popup::~Popup()

Destructor.

Esri::ArcGISRuntime::TaskWatcher Popup::evaluateExpressions() const

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 function was introduced in Esri::ArcGISRuntime 100.8.

QString Popup::formattedValue(Esri::ArcGISRuntime::PopupField *popupField) const

Returns the formatted value of the popup field.

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

Esri::ArcGISRuntime::GeoElement *Popup::geoElement() const

Returns the GeoElement of this Popup.

Esri::ArcGISRuntime::PopupDefinition *Popup::popupDefinition() const

Returns the PopupDefinition of this Popup.

Esri::ArcGISRuntime::Symbol *Popup::symbol() const

Returns the Symbol of this Popup.

QString Popup::title() const

Returns the title of this Popup.


Feedback on this topic?