# lnglat-transform

> 支持百度坐标（BD09）、国测局坐标（火星坐标，GCJ02,）、和WGS84（gps）坐标系之间的转换

Latest version **1.0.1** (published 2021-12-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install lnglat-transform
pnpm add lnglat-transform
yarn add lnglat-transform
bun add lnglat-transform
```

## 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.1 |
| Published | 2021-12-08 |
| First published | 2021-12-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | tiandashu |
| Maintainers | tiandashu |
| Keywords | 支持百度坐标（BD09）、国测局坐标（火星坐标，GCJ02,）、和WGS84（gps）坐标系之间的转换 |

## Links

- npm: https://www.npmjs.com/package/lnglat-transform
- npm.io page: https://npm.io/package/lnglat-transform

## Dependencies (1)

- [pre-commit](https://npm.io/package/pre-commit.md) ^1.2.2

## Recent versions

- 1.0.1 (latest) — 2021-12-08
- 1.0.0 — 2021-12-08

## README

# feat

> 支持百度坐标（BD09）、国测局坐标（火星坐标，GCJ02,）、和 WGS84（gps）坐标系之间的互转，转换精度更高

# use

```js
npm i -S lnglat-transform
const TransformLngLat = require('lnglat-transform')

// instance
const instace = new TransformLngLat()
```

# static props

TransformLngLat.mapInfo

> 获取坐标系说明

# instance methods

### instace.bd09ToGcj02(lng, lat)

百度转国测局

```
@param lng
@param lat
@returns [lng, lat]
```

### instace.gcj02ToBd09(lng, lat)

国测局转百度

```
@param lng
@param lat
@returns [lng, lat]
```

### instace.gcj02ToWgs84(lng, lat)

国测局转 WGS84

```
@param lng
@param lat
@returns [lng, lat]
```

### instace.wgs84ToGcj02(lng, lat)

WGS84 转国测局

```
@param lng
@param lat
@returns [lng, lat]
```

### instace.wgs84ToBd09(lng, lat)

WGS84 转 BD-09

```
@param lng
@param lat
@returns [lng, lat]
```

### instace.bd09ToWgs84(lng, lat)

BD-09 转 WGS84

```
@param lng
@param lat
@returns [lng, lat]
```

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