Location Update Constraint

Since version: 1.16

The Location Update Constraint profile allows the map author to write an expression that evaluates whether a new location should be used or not. For example, when location updates are received from a GPS device, the expression may reject location updates with a very poor horizontal accuracy. This profile is used for filtering location updates when working with Geotriggers in ArcGIS Maps SDKs for Native Apps. The script should return a Boolean with true indicating the location meets the constraint criteria or false indicating it does not meet the criteria.

Context

The following products implement this profile:

Spatial reference

The spatial reference of the map in which the expression executes determines the execution context's spatial reference.

Time zone

The time zone of the map in which the expression executes determines the execution context's default time zone.

Profile variables

Variable NameTypeDescription
$locationupdateFeatureThe location update feature (e.g. from GPS) being evaluated for the constraint.

Note that, when the $locationupdate feature represents a device location, it includes position and metadata of the device - usually obtained from GPS. The feature has a Geometry (usually a point) and a fixed schema with the following properties:

PropertyTypeDescription
courseNumberThe course of the location in degrees clockwise, 0 being true North.
horizontalaccuracyNumberThe horizontal accuracy of the location in meters.
verticalaccuracyNumberThe vertical accuracy of the location in meters.
velocityNumberThe velocity of the location in meters per second.

Function bundles

Core | Geometry

Return types

Boolean

Example

The following expression rejects location updates when the horizontal accuracy is over 20 meters:

Use dark colors for code blocksCopy
1
$locationupdate.horizontalaccuracy <= 20

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