# Location Sensor

![](/files/-LAn66OHeUWrLzEQSkVv)

## Adding a Location Sensor to your app

To add a Location Sensor to your app:

1. Navigate to the **Blocks** tab of your project.
2. Under the App Features heading, locate **Sensors**.&#x20;
3. Click the ⊕ symbol next to Sensor.
4. Select **Location Sensor** from the provided menu.
5. Click **Add**.

![](/files/-MMGscus1Tmzgj_p_Z1B)

![](/files/-MMGtN30eJmSdWNKCxqJ)

You will see a settings panel where you can set the properties of the Location Sensor before clicking Submit.

## Properties

| Property           | Description                                                                                                      | Data Type  |
| ------------------ | ---------------------------------------------------------------------------------------------------------------- | ---------- |
| EnableHighAccuracy | Enables network provider that uses Google Play services to improve location accuracy and location-based services | True/False |
| Timeout            | How long the Lotion Sensor will look for the user's location before quitting, in milliseconds                    | Number     |
| Maximum Age        | How long a previously fetched location will remain valid, in milliseconds                                        | Number     |

## Blocks

### Functions

#### Get Current Location

![](/files/-MXHS5NJSN15G0XTWWTV)

#### Properties

| Event / Property     | Description                                                                                                                                                                                                                                                              |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Get Current Location | Returns a user's location in  `latitude` and `longitude` degrees; also includes additional information in a location object including i) estimated location `accuracy` in meters,  ii) `altitude` in meters, iii)  `speed` in meters/second and iv) `heading` in degrees |

#### Example

![](/files/-MXHRVyID36zSz_CMzda)

The Location Sensor returns a user's current location in `latitude` and `longitude` as well as a `location` object which includes additional properties like `accuracy`, `altitude`, `speed` and `heading` (or direction) which you have to retrieve with the object blocks above

### Properties

#### Enable High Accuracy&#x20;

![](/files/-MXHSDC0KECUsPzqBb-V)

#### Maximum Age&#x20;

![](/files/-MXHSVtlpzuYhC-OXyCz)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.thunkable.com/blocks/app-features/sensors-blocks/location-sensor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
