Description Usage Arguments Value Examples
Takes a vector of lat/lon coordinates, or a list of lat/lon coordinates, sends them to the Baidu Maps API, output a char vector of addresses and address component info, as json text objects. This function also implements a data dictionary, saved as an rda object, to avoid sending the same query to Baidu twice.
1 2 |
lat |
numeric vector, vector of latitude values. |
lon |
numeric vector, vector of longitude values. |
type |
string, dictates the return data type. Valid inputs are
|
force |
logical, force online query, even if previously downloaded and saved to the data dictionary. |
cache_chunk_size |
integer, indicates how often you want the API return data to be saved to the package cache. Default value is NULL. |
char vector of json text objects. Each object contains the return value(s) from the Baidu Maps query, as well as the return value status code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
lat <- c(
30.616167082550779,
30.39624844375698,
30.679942845419565
)
lon <- c(
114.27287244473057,
119.87833669326516,
104.06792346330406
)
bmap_get_location(lat, lon)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.