Skip to content

Geofencing

The Geofencing element defines circular geographic zones on a map and detects when a user enters or exits those zones. It uses the browser's Geolocation API for real-time position tracking.


Features

  • Circular geofence zones with configurable radius
  • Real-time tracking via navigator.geolocation.watchPosition
  • Enter/exit triggers — fire actions when user crosses zone boundaries
  • Zone list with status indicators (INSIDE / outside)
  • Custom zone colors and action labels
  • Haversine distance calculation for accurate zone detection

Settings

SettingDescriptionDefault
Map HeightHeight of the map area in pixels300
Track UserEnable real-time position trackingfalse
Show Zone ListDisplay zone list below the maptrue
Trigger on EnterFire action when user enters a zonetrue
Trigger on ExitFire action when user leaves a zonefalse

Zones

Each zone entry has:

  • Name — zone label (e.g., "Office", "Warehouse")
  • Latitude / Longitude — center coordinates
  • Radius — zone radius in meters
  • Action — action to trigger (e.g., "notify", "log", "alert")
  • Color — zone indicator color

Click + Add Zone to add entries. Click x to remove.


How It Works

  1. When Track User is enabled, the browser requests location permission
  2. The element continuously monitors the user's GPS coordinates
  3. For each zone, haversine distance is calculated from user to zone center
  4. If the distance is less than the zone radius, the user is "inside"
  5. Enter/exit transitions trigger the configured action
  6. The zone list shows real-time INSIDE/outside status

Use Cases

  • Attendance tracking at job sites
  • Location-based check-ins
  • Delivery zone verification
  • Safety perimeter monitoring

Styling

The Geofencing element supports standard Container color and dimension settings:

  • Background color, border, padding, margin
  • Border radius and width

Questions?

If you have any questions, please don't hesitate to contact us. Alternatively, you can submit an issue on this platform.

Was this article helpful?

No-Code App Builder