# @tulpep/foundit-geolocation

> Module to obtain the coordinates of a device

Latest version **1.2.2** (published 2019-12-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tulpep/foundit-geolocation
pnpm add @tulpep/foundit-geolocation
yarn add @tulpep/foundit-geolocation
bun add @tulpep/foundit-geolocation
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2019-12-19 |
| First published | 2019-12-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 9.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ricardopolo |

## Links

- npm: https://www.npmjs.com/package/@tulpep/foundit-geolocation
- Repository: https://github.com/Tulpep/foundit-geolocation
- Homepage: https://github.com/Tulpep/foundit-geolocation#readme
- Issues: https://github.com/Tulpep/foundit-geolocation/issues
- npm.io page: https://npm.io/package/@tulpep/foundit-geolocation

## Dependencies (4)

- [arch](https://npm.io/package/arch.md) ^2.1.1
- [axios](https://npm.io/package/axios.md) ^0.19.0
- [is-elevated](https://npm.io/package/is-elevated.md) ^3.0.0
- [@tulpep/foundit-cross](https://npm.io/package/@tulpep/foundit-cross.md) ^2.1.7

## Recent versions

- 1.2.2 (latest) — 2019-12-19
- 1.2.1 — 2019-12-03

## README

# FOUNDiT Geolocation Module
 Module to obtain the coordinates of a device.

## Supported Operating Systems

 * Windows
 * Linux

## How to Install it

`npm install @tulpep/foundit-geolocation`

## Available Methods 

### `getNativeCoordinates()`
This method provides information about the device's location, such as latitude and longitude. 

The function does not require parameters, it is responsible for identifying whether the operating system is Windows or Linux and returns an object with the location data, which includes longitude, latitude.

function GetCoordinates()

Example return for Windows 
```
    { 
        latitude: '4.84908701281889',
        longitude: '-74.0549017722177',
        altitude: '0',
        horizontalAccuracy: '83',
        verticalAccuracy: 'null' 
    }
```

Example return for Linux 
```
    { 
        latitude: 4.8588,
        longitude: -74.0587,
        altitude: undefined,
        horizontalAccuracy: 9007199254740991,
        verticalAccuracy: 9007199254740991 
    }
```

## How To Use it:

`npm run test`
```
const getCurrentLocation = async () => {
  const result = await geolocation.GetNativeCoordinates();
  console.log(result);
};
getCurrentLocation();
```

## Dependencies

- [@tulpep/foundit-cross](https://www.npmjs.com/package/@tulpep/foundit-cross) | License MIT: This module to execute commads to operating system and validate platform.

- [arch](https://www.npmjs.com/package/arch) | License MIT: This module is used by WebTorrent Desktop to determine if the user is on a 32-bit vs. 64-bit operating system to offer the right app installer.

- [axios](https://www.npmjs.com/package/axios) | License MIT: This module use promise based HTTP client for the browser.

- [is-elevated](https://www.npmjs.com/package/is-elevated) | License MIT:  Check if the process is running with elevated privileges.

---
_Source: https://npm.io/package/@tulpep/foundit-geolocation · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
