wgs84_gcj02
v1.0.0
Published
Convert between wgs84 coordinates and gcj02 cross range coordinates
Downloads
1
Maintainers
Readme
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 })