> ## Documentation Index
> Fetch the complete documentation index at: https://docsv4.mile.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Geofence

> Draw areas on the map, group them, and watch when field workers enter or leave them.

A **geofence** is an area on the map, such as a warehouse, a customer site or a restricted zone. When a field worker enters or leaves an active geofence, a [Geofence alert](/pages/settings/alert-setting) can be raised and an [On Geofence Entry](/pages/workflow/automation/events/on-geofence-entry) or [On Geofence Leave](/pages/workflow/automation/events/on-geofence-leave) automation can run.

Geofences are grouped into **geofence groups**. A group is how geofences are filtered on this screen, and an automation watches exactly one group.

<Note>
  Geofence is still rolling out and is only turned on for selected organizations. If yours is not included, the Geofence menu doesn't appear. Contact support to have your organization included.
</Note>

## The geofence list

Open **Settings › Geofence**.

<Note>
  Required permission:

  * View geofence
</Note>

<div align="center">
  <img src="https://mintcdn.com/mileappv4/Xul_B0hUk35UiMLk/images/v4/settings/geofence.png?fit=max&auto=format&n=Xul_B0hUk35UiMLk&q=85&s=160fc5a6c93d407fbacf8e5b98613762" alt="Geofence list" width="600" data-path="images/v4/settings/geofence.png" />
</div>

1. **Filter**: show only geofences of one **Group** (or **Ungrouped**) and one **Type** (**Polygon** or **Circle**). Each active filter appears as a chip you can remove; **Reset all** clears them. Next to it, **Search by name** finds a geofence by its name.
2. **Manage groups**: create, rename and delete geofence groups.
3. **New**: draw a new geofence.
4. **Status** switch: turn a geofence on or off straight from the list.
5. **Geofence actions**: **Edit** or **Delete** the geofence.

The table has these columns:

| Column | What it shows |
| - | - |
| **Name** | The geofence name. |
| **Type** | **Polygon** (an area drawn corner by corner) or **Circle** (a centre and a radius). |
| **Group** | The geofence group it belongs to, or **-** when it has no group. |
| **Radius** | For a circle, the distance from the centre in metres, for example *250 m*. Empty for a polygon. |
| **Dwell time** | How long a worker must stay inside before the entry counts, for example *10 min*. **None** means it counts on entry. |
| **Status** | **Active** geofences are checked against workers' positions. **Inactive** ones are kept but ignored: they raise no alerts and run no automations. |

The count above the table shows how many geofences there are, or how many match your filters.

## Manage groups

<Note>
  Required permission:

  * View geofence
  * Create geofence, Edit geofence or Delete geofence
</Note>

Click **Manage groups**.

<div align="center">
  <img src="https://mintcdn.com/mileappv4/Xul_B0hUk35UiMLk/images/v4/settings/geofence-groups.png?fit=max&auto=format&n=Xul_B0hUk35UiMLk&q=85&s=be4b32c5dea4bc5337c995ec74a3e763" alt="Manage groups" width="600" data-path="images/v4/settings/geofence-groups.png" />
</div>

The dialog lists each group with its **No.**, **Name** and the number of geofences in it (**Geofence**).

* **Add group**: write the **Group name** and save it.
* **Pencil**: rename the group.
* **Trash can**: delete the group, then confirm. This cannot be undone.

You can also create a group while drawing a geofence, with the **+** button next to **Group**.

## Draw a geofence

<Note>
  Required permission:

  * View geofence
  * Create geofence
</Note>

Click **New**. The editor opens in a large dialog: the map, with the details panel on the right. **Hide details** folds the panel away so you can see more of the map.

<div align="center">
  <img src="https://mintcdn.com/mileappv4/Xul_B0hUk35UiMLk/images/v4/settings/geofence-new.png?fit=max&auto=format&n=Xul_B0hUk35UiMLk&q=85&s=9b09bdcc9e67760c857c85ce24a4ee94" alt="New geofence" width="600" data-path="images/v4/settings/geofence-new.png" />
</div>

Use **Search for an address** at the top left to move the map to a place, then fill in the details:

1. **Type**: choose the shape.
   * **Polygon**: click the map to place each corner, drag a corner to move it, and right-click a corner to remove it. Place at least three corners. A corner that would cross an edge you already drew is refused. **Undo** removes the last corner and **Start over** clears the shape. The panel counts the corners placed.
   * **Circle**: click the map or drag the pin to move the centre, and set the **Radius** in meters beside it. The radius must be more than zero. A new circle is sized to fit the map you're looking at, and picking an address from the search moves the circle there. Switching between Polygon and Circle keeps the map where it is.
2. **Group**: the geofence group it belongs to, or **No group**. Click **+** to create a group here.
3. **Dwell time**: how many minutes a worker must stay inside before it counts. **0** means on entry. It must be a whole number between 0 and 1440.

Also give the geofence a **Name** (required, up to 100 characters) and set its **Status**: **Active** by default. Click **Save**.

**Show other geofences** draws your existing geofences behind the one you're drawing, so you can line them up or avoid overlaps. **Undo** sits beside this switch.

## Edit a geofence

<Note>
  Required permission:

  * View geofence
  * Edit geofence
</Note>

Open **Geofence actions** on the row and choose **Edit**. You can change the shape, name, group, dwell time and status, then click **Save**. If you close the dialog with changes, you're asked to **Discard** them or **Keep editing**.

To pause a geofence without opening it, use the **Status** switch in the list. Turning a geofence off stops it raising alerts and running automations, without deleting it.

## Delete a geofence

<Note>
  Required permission:

  * View geofence
  * Delete geofence
</Note>

Open **Geofence actions**, choose **Delete** and confirm. This cannot be undone. The deleted geofence is kept for 30 days in [Trash](/pages/settings/trash) for reference.

## Related

* [Alert Setting](/pages/settings/alert-setting): turn the **Geofence** alert and its notification on or off.
* [Alert](/pages/monitoring/alert): see the geofence alerts that were raised.
* [Tracking](/pages/monitoring/tracking/introduction): show geofences on the tracking map.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.