# latlongulator

> NPM Package About Geo Calculation Operations

Latest version **1.0.2** (published 2022-09-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install latlongulator
pnpm add latlongulator
yarn add latlongulator
bun add latlongulator
```

## 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.0.2 |
| Published | 2022-09-08 |
| First published | 2022-09-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | s01tan |

## Links

- npm: https://www.npmjs.com/package/latlongulator
- Repository: https://github.com/s-s01tan/latlongulator
- Homepage: https://github.com/s-s01tan/latlongulator#readme
- Issues: https://github.com/s-s01tan/latlongulator/issues
- npm.io page: https://npm.io/package/latlongulator

## Recent versions

- 1.0.2 (latest) — 2022-09-08
- 1.0.1 — 2022-09-08
- 1.0.0 — 2022-09-08

## README

## <img src="./assets/icon.png" width=26 height=26> <strong>LatLong</strong>ulator Package

<hr/>

### The NPM package which presents utils for geo calculation operations.

<br/>

### Getting the distance between 2 locations:

- By Kilometers (km)

```
// Async Version
getDistanceByKilometers(
  { lattitude: 43.6426723, longtitude: 44.2531532 },
  { lattitude: 50.9483754, longtitude: 49.3948516 },
  function (err, res) {
    if (err) return err;
    console.log(res);
  }
);

// Sync Version
getDistanceByKilometersSync(
  { lattitude: 43.6426723, longtitude: 44.2531532 },
  { lattitude: 50.9483754, longtitude: 49.3948516 }
);

```

- By Miles (ml)

```
// Same code structure like above with names getDistanceByMiles and getDistanceByMilesSync
```

### <strong>Note:</strong> Location point should be declared like below

```
{
    lattitude: number,
    longtitude: number
}
```

### Converters between kilometers and miles scales:

- From kilometers to miles

```
const km = 2.4;
const miles = kilometers2miles(km);
```

- From miles to kilometers

```
const ml = 4.5;
const kilometers = miles2kilometers(ml);
```

<hr/>

### ❤️‍🔥 Source Code: <a href="https://github.com/s-s01tan/latlongulator" target="_blank">https://github.com/s-s01tan/latlongulator</a>

### 🔗 LinkedIn: <a href="https://www.linkedin.com/in/s-s01tan/" target="_blank">https://www.linkedin.com/in/s-s01tan/</a>

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