| convertCoord | R Documentation |
Convert coordinates to the AutoNavi system
convertCoord(
locations,
key = NULL,
coordsys = NULL,
sig = NULL,
output = "tibble",
keep_bad_request = TRUE,
...
)
locations |
Required. Coordinate string(s) to convert. Accepts a character vector. |
key |
Optional. AutoNavi API key. You can also set this globally via 'options(amap_key = "your-key")'. |
coordsys |
Optional. Source coordinate system ('gps', 'mapbar', 'baidu', 'autonavi'). |
sig |
Optional. Manual digital signature. Most workflows can enable automatic signing via [with_amap_signature()] or [amap_config()]. |
output |
Optional. Output data structure. Supported values are '"tibble"' (default), '"JSON"', and '"XML"'. |
keep_bad_request |
Optional. When 'TRUE' (default) API errors are converted into placeholder rows so that batched workflows continue. When 'FALSE' errors are raised as 'amap_api_error' conditions. |
... |
Optional. Included for forward compatibility only. |
When 'output = "tibble"', a 'tibble' with columns 'lng' and 'lat' is returned. The table preserves the input order and gains a 'rate_limit' attribute containing any rate limit headers returned by the API. When 'output' is '"JSON"' or '"XML"', the parsed body is returned without further processing.
[extractConvertCoord()], [with_amap_signature()], [amap_config()]
## Not run:
convertCoord("116.481499,39.990475", coordsys = "gps")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.