Unofficial Content

Geofencing can be defined as a technology that uses the data of a device's location, such as GPS, RFID, or Wi-Fi, to track whether a device is inside or outside a 'fence' ('fence' refers to a virtual limit around an area in the real world).

To use this technology, the Maps external object offers the following methods:

Samples

Suppose you need to to create and configure an alert using the SetProximityAlerts method. This alert will be triggered when the device approaches the specified location, within the defined X amount of meters. The code will look like this:

&alert.ActionName = 'ProxAlertNotification' 
&alert.Name = 'Test'
&alert.ExpirationTime = #2015-12-31# 
&alert.GeoLocation = '-34.8910275746741, -56.18720064473088' // location
&alert.Radius = 1000 // in meters
&alerts.Add(&alert) 

&boolean = Maps.SetProximityAlerts(&alerts)

This will trigger an alert which is going to execute the event 'ProxAlertNotification' when the user moves within or beyond 1000 mts from the geolocation '--34.8910275746741, -56.18720064473088'.

See Also

HowTo: Use Location Proximity Alerts

Last update: November 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant