UNPKG

gps-transf

Version:

This is A Map coordinate conversion tool.

38 lines (25 loc) 957 B
# gps-transf This is A Map coordinate conversion tool. The coordinate conversion tool provides the conversion between Baidu coordinate (bd09), National Survey Bureau coordinate (Mars coordinate, gcj02) and WGS84 coordinate system. ## How use ### node.js ```javascript let gps=require('gps-transf'); console.log(gps.bd09ToGcj02(116.228345,39.944812)); ``` ### brower ```javascript import gps from 'gps-transf'; console.log(gps.bd09ToGcj02(116.228345,39.944812)); ``` ### APIs ```javascript //Transformation between Baidu coordinate system (bd-09) and Mars coordinate system (gcj-02) bd09togcj02(lon,lat):Array[lon,lat]; //Transformation between Mars coordinate system (gcj-02) and Baidu coordinate system (bd-09) gcj02ToBd09(lon,lat):Array[lon,lat]; //WGS84 to GCj02 wgs84ToGcj02(lon,lat):Array[lon,lat]; //GCJ02 to WGS84 wgcj02ToWgs84(lon,lat):Array[lon,lat]; ```