> ## 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.

# Coordinate

> Capture a GPS position, check that the field worker is really there, and fill it from an address.

**Coordinate** captures a position as `latitude, longitude`, from the device GPS, from the map or typed in. It is the main component for location-based work: route planning, checking that a worker is at the right place, and showing tasks on the map.

> [!NOTE]
>
> In the previous version this type was called **Geolocation**.

**Use cases**

* **Delivery location**: the customer's position on the Initial page, for route planning and a proof-of-delivery check.
* **Site check-in**: prove the technician reached the right place.
* **Import with addresses only**: let the coordinate be found from the address.

## Properties

![Coordinate properties](https://mintcdn.com/mileappv4/Xul_B0hUk35UiMLk/images/v4/workflow/components/input-coordinate.png?fit=max\&auto=format\&n=Xul_B0hUk35UiMLk\&q=85\&s=098b137346b2c2ebdf5c591e40492283)

1. **Default Value**: a coordinate filled in for every new task, for example `-6.2, 106.8`. Click the pin to pick it on a map.
2. **Visible**: when off, the field is hidden on the web and the field app; its value is still kept and exported.
3. **Required**: the task cannot be saved or finished until a coordinate is set.
4. **Geolock**: when on, the task can only be started or finished within the **Radius (Meter)** of this coordinate. The radius is required while Geolock is on and must be 0 or more. Geolock is checked on the field app only.
5. **Geolock Trigger**: when the check happens: **On task start** or **On task done**. Each trigger can be used by one coordinate per flow.
6. **Geocode**: when on, pick the Address component the coordinate is found from. The list shows the flow's Address inputs.
7. **Show As**: show the coordinate in the task list as the task's **Title**, **Content** or **Label**.
8. **Route As** (Initial page only): pass the coordinate to route planning as the visit's **Coordinate**.

## Geolock and Geocode

| | Geolock | Geocode |
| - | - | - |
| **Purpose** | Checks that the field worker is near the coordinate | Fills the coordinate from an address |
| **Effect** | Blocks starting or finishing the task outside the radius | Writes the coordinate; never blocks anything |
| **Settings** | Radius (Meter) and Geolock Trigger | The Address component to read |
| **Together** | Both can be on for the same coordinate | |

## Rules

* **Radius** is required, and 0 or more, while Geolock is on.
* **Geolock Trigger** is required while Geolock is on.
* A flow can have one coordinate with **On task start** and one with **On task done**. Picking a trigger another coordinate already uses is refused.
* **Geocode** needs an Address component. If the list is empty, add an Address input first.
* To go the other way, filling an address from this coordinate, turn on **Georeverse** on the [Address](https://docsv4.mile.app/pages/workflow/flow/components/input/address.md#georeverse) component instead.
* Inside a [Subpage](https://docsv4.mile.app/pages/workflow/flow/components/subpage.md), a coordinate keeps the map picker but has no Geolock.

## On the field app

The field shows `latitude, longitude` with a map picker. The worker uses their current position or picks a point on the map. With **Geolock** on, starting or finishing the task (per the trigger) outside the radius is blocked with a message.


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