Description Usage Arguments Value Examples
View source: R/getCoordinate.R
Get coordiante from address. Take in address and return the coordinate
1 2 | getCoordinate(address, city = NULL, output = "json", formatted = F,
limit = 600, map_ak = "")
|
address |
address |
city |
the city of the address, optional |
output |
should be "json" or "xml", the type of the result |
formatted |
logical value, return the coordinates or the original results |
limit |
integer value.If the length of address exceeded limit, function will run in parallel |
map_ak |
access key of GaoDe map service, you can set it through options(gaode.key='xxx') |
A vector contains the corresponding coordiante. If "formatted=TRUE", return the numeric coordinates, otherwise return json or xml type result, depents on the argument "output". If the length of address is larger than 1, the result is a matrix.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
## json output
getCoordinate('鍖椾含澶у')
## xml output
getCoordinate('鍖椾含澶у', output='xml')
## formatted
getCoordinate('鍖椾含澶у', formatted = T)
## vectorization, return a matrix
getCoordinate(c('鍖椾含澶у', '娓呭崕澶у'), formatted = T)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.