Determine if a location is in named geofence (InNamedGeofence() function)

The InNamedGeofence() function determines if a location is within a named geofence. Named geofences must have been previously defined and saved to the Platform for reuse. Note that any location on the boundary is considered inside the geofence.

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

Format:

Boolean InNamedGeofence(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 example returns true if the asset is located within the defined Headquarters geofence.

If: InNamedGeofence("Headquarters", Location.location)

See Also