> For the complete documentation index, see [llms.txt](https://docs.emobiq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/device/getlocation.md).

# getLocation

## Description

Get the current location details (GPS coordinate) of the device.

## Input / Parameters

| No | Name               | Description                               | Data Type | Required | Example         |
| -- | ------------------ | ----------------------------------------- | --------- | -------- | --------------- |
| 1  | timeout            | Connection time out period in millisecond | Integer   | Yes      | 1000, 2000, ... |
| 2  | enableHighAccuracy | Enable High Accuracy                      | Boolean   | No       |                 |

## Output

## Callback

## Video

## Example

Users want to detect current location from current device.

### Step

1. Call the function.\
   timeout: 30000 (connection timeout after 30 seconds)\
   enableHighAccuracy: true

   ![](/files/4YMcbucIrGsUJVS6K0YA)
2. In callback, add a console -> use input function to view the result.

   ![](/files/QdqYgSiwsSFnsbLi7oqp)

### Result

User will see the result below in console:\
\&#xNAN;**{** accuracy: 20\
altitude: null\
altitudeAccuracy: null\
heading: null\
lat: 3.1319238\
latLng: "3.1319238,101.63117249999999"\
latitude: 3.1319238\
long: 101.63117249999999\
longitude: 101.63117249999999\
speed: null\
timestamp: 1554082377187 **}**

## Links

### Notes

* timeout format is in millisecond (ms).
