Get distance from asset to named geofence function (DistanceToNamed Geofence() function)

The DistanceToNamedGeofence() function determines the distance between an asset and the edge of a named geofence (that is, one that was previously defined in the Axeda® Platform).

Note: To create geofences, you must use either the Axeda Platform Web services or the .NET client to create geofences. Refer to the Axeda® Connected Product Management Applications Web Services Reference Guide for more information.

Format:

Number DistanceToNamedGeofence(String name, String location)

where:

name - name of the previously defined geofence; this geofence must exist in the Platform.

location - location of the asset. For a MobileLocation trigger, you can specify an unqualified "location". For all other triggers, you need to qualify this as "Location.location".

Example:

The following expression evaluates to true if the asset is located more than five miles from the boundary of the defined "Distribution_Center" geofence.

If: DistanceToNamedGeofence("Distribution_Center", Location.location) > 5