Description Usage Arguments Value Examples
Takes a vector of locations (address, business names, etc), sends them to the Baidu Maps API, output a char vector of coordinates, 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 |
location |
char vector, vector of locations. |
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. |
skip_short_str |
logical, if TRUE then any input strings with length of three or less will not be queried in the Baidu API, and a json str with custom status code will be returned, indicating the str is too short to query. The idea is that if a str is three char's or less, then it's probably not an actual address, company/business name, or location. Default value is FALSE. |
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 | ## Not run:
locs <- c(
"中百超市有限公司长堤街二分店",
"浙江省杭州市余杭区径山镇小古城村",
"成都高梁红餐饮管理有限公司"
)
bmap_get_coords(locs)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.