Description Usage Arguments Value Examples
Geocode a particular address.
1 |
address |
a string, address to geocode, more specific the better |
api |
which API to use, currently supports "Amap" or "Baidu" |
key |
API application key |
output |
specify output type, JSON or XML |
Geocode of address (latitude, longitude) # take note of the order
1 2 3 4 5 6 7 8 9 10 | ## Not run:
geocode("北京市朝阳区朝阳首府", api = "amap", key = "Your_Api_Key_Here")
# set application key via environment variables
file.edit("~/.Renviron")
# restart R to take effect
amap_ak <- Sys.getenv("amap_ak")
geocode("北京市朝阳区朝阳首府", key = amap_ak, output = "xml")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.