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:
- ArcGIS Maps SDKs for Native Apps
- ArcGIS Field Maps
Spatial reference
The spatial reference of the map in which $locationupdate
is rendered determines the spatial reference of the expression's execution context.
Profile variables
Variable Name | Type | Description |
---|---|---|
$locationupdate | Feature | The 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:
Property | Type | Description |
---|---|---|
course | Number | The course of the location in degrees clockwise, 0 being true North. |
horizontalaccuracy | Number | The horizontal accuracy of the location in meters. |
verticalaccuracy | Number | The vertical accuracy of the location in meters. |
velocity | Number | The velocity of the location in meters per second. |
Function bundles
Return types
Example
The following expression rejects location updates when the horizontal accuracy is over 20 meters: