filter
An com.arcgismaps.arcade.ArcadeExpression that controls whether an update from the LocationGeotriggerFeed is sent to a GeotriggerMonitor. The expression uses the Arcade language to determine whether feed entity updates are suitable for monitoring. The com.arcgismaps.arcade.ArcadeExpression must evaluate to a boolean where:
True indicates that the update will be used.
False indicates that the update will not be used.
Filtering out undesirable updates reduces inaccurate notifications from your GeotriggerMonitor. For example, you could filter out GPS updates where the horizontal accuracy is poor, to avoid false enter and exit notifications.
With a LocationGeotriggerFeed, the expression inspects a new com.arcgismaps.location.Location object and returns true if it is suitable and false if not. Typically, your expression excludes com.arcgismaps.location.Location objects where the com.arcgismaps.location.Location.horizontalAccuracy does not meet your criteria - but it could also consider other properties such as com.arcgismaps.location.Location.speed and com.arcgismaps.location.Location.course.
Arcade gives you access to the properties of the feed entity with the $locationupdate profile variable. This represents a new com.arcgismaps.location.Location received from your device GPS. For example, an com.arcgismaps.arcade.ArcadeExpression with the following string rejects com.arcgismaps.location.Location updates with a horizontal accuracy greater than 10 meters:
return $locationupdate.horizontalaccuracy <= 10;
Since
200.1.0