1.0.0 • Published 8 months ago

wgs84_gcj02 v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago
npm install wgs84_gcj02

two methods:

wgs84_gcj02 -> params: { longitude: number | string, latitude: number | string }
gcj02_2_wgs84 -> params: { longitude: number | string, latitude: number | string }
return { longitude: xxxx, latitude: xxxx }
// convert wgs84 to gcj02

import wgs84_gcj02 from 'wgs84_gcj02'

const { longitude, latitude } = wgs84_gcj02.wgs84_gcj02({ longitude: 121.4603, latitude: 31.2594 })
// convert gcj02 to wgs84

import { gcj02_2_wgs84 } from 'wgs84_gcj02'

const { longitude, latitude } = gcj02_2_wgs84({ longitude: 121.4603, latitude: 31.2594 })
1.0.0

8 months ago