;

GeotriggerNotificationInfo Class

  • GeotriggerNotificationInfo
  • class Esri::ArcGISRuntime::GeotriggerNotificationInfo

    A notification that a Geotrigger condition has been met. More...

    Header: #include <GeotriggerNotificationInfo>
    Since: Esri::ArcGISRuntime 100.12
    Inherits: Esri::ArcGISRuntime::Object
    Inherited By:

    Esri::ArcGISRuntime::FenceGeotriggerNotificationInfo

    This class was introduced in Esri::ArcGISRuntime 100.12.

    Public Functions

    virtual ~GeotriggerNotificationInfo() override
    Esri::ArcGISRuntime::Location feedLocation() const
    Esri::ArcGISRuntime::GeotriggerMonitor *geotriggerMonitor() const
    Esri::ArcGISRuntime::GeotriggerNotificationInfoType geotriggerNotificationInfoType() const
    QString message() const
    QVariantMap messageProperties() const

    Detailed Description

    A GeotriggerNotificationInfo is sent by a GeotriggerMonitor whenever the condition described by its Geotrigger is met. The Geotrigger also defines how the GeotriggerNotificationInfo should be displayed. For example, it describes what message should be displayed to the user.

    Member Function Documentation

    [override virtual] GeotriggerNotificationInfo::~GeotriggerNotificationInfo()

    Destructor.

    Esri::ArcGISRuntime::Location GeotriggerNotificationInfo::feedLocation() const

    Returns a Location, received from the feed, that meets the GeotriggerMonitor condition.

    The Location is set if a LocationGeotriggerFeed was used to create the Geotrigger that the GeotriggerMonitor is monitoring. This allows you to access the position and meta-data from the feed, such as the horizontal accuracy, velocity, and time stamp.

    Esri::ArcGISRuntime::GeotriggerMonitor *GeotriggerNotificationInfo::geotriggerMonitor() const

    Returns the GeotriggerMonitor that sent this notification.

    The GeotriggerMonitor evaluates a specific Geotrigger condition that has been met by this GeotriggerNotificationInfo. A single Geotrigger condition can result in multiple, repeat notifications.

    This property can be used to interact directly with the GeotriggerMonitor. For example, if you no longer want to receive future notifications, you can call GeotriggerMonitor::stop.

    Esri::ArcGISRuntime::GeotriggerNotificationInfoType GeotriggerNotificationInfo::geotriggerNotificationInfoType() const

    Returns the type of geotrigger notification.

    The type for a specific GeotriggerNotificationInfo object.

    QString GeotriggerNotificationInfo::message() const

    Returns a message that describes the notification.

    The notification message is the result of evaluating the Geotrigger::messageExpression for the specific feed and fence objects that triggered this notification. The message could be a hard-coded string or use attributes from an area of interest that was entered to display a custom message.

    For example, with a FenceGeotrigger, setting the Geotrigger::messageExpression property to:

    "You have entered " + $fencefeature.area_name

    would return the message "You have entered Area A", where "area_name" is an attribute field on the FenceGeotriggerNotificationInfo::fenceGeoElement.

    You can use this message to alert the user of the notification or in other business logic in your app.

    QVariantMap GeotriggerNotificationInfo::messageProperties() const

    Returns a dictionary of optional properties derived from the Geotrigger::messageExpression.

    Optionally, the ArcadeExpression can be evaluated to produce properties on top of the basic message. You can access this additional information via this dictionary.

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