Description Usage Arguments Value Examples
Function to convert GCJ02 coordinates to WGS84 coordinates.
This function uses bisection method to find more accuate WGS84 coordinates. This function requires heavy computation and it is good for scenarios in which great accuracy, as good as less than a few meters error, is needed.
Geographic data from Baidu and coordinates in Baidu maps are BD09 coordinates. Geographic data from Chinese official websites and coordinates from Chinese map providers such as Gaode and QQ map are GCJ02 coordinates. GCJ02 coordinates is the first encryption applied to WGS84 coordinates. BD09 adds one more layer of encryption on top of GCJ02.
1 | gcjtowgs_acc(coordinates)
|
coordinates |
A vector of coordinate pair c(lat, lon) |
lat, lon
1 2 3 4 | #Coordinate data from official websites eg. c(39.8673, 116.366)
#Convert to WGS84 coordinates
gcjtowgs_acc(c(39.8673, 116.366))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.