getLocation | R Documentation |
Get location from coordinate
getLocation(
lng,
lat,
key = NULL,
poitype = NULL,
radius = NULL,
extensions = NULL,
roadlevel = NULL,
sig = NULL,
output = "data.table",
callback = NULL,
homeorcorp = 0,
keep_bad_request = TRUE,
...
)
lng |
Required. |
lat |
Required. |
key |
Optional. |
poitype |
Optional. |
radius |
Optional. |
extensions |
Optional. |
roadlevel |
Optional. |
sig |
Optional. |
output |
Optional. |
callback |
Optional. |
homeorcorp |
Optional. |
keep_bad_request |
Optional. |
... |
Optional. |
Returns a JSON, XML or data.table of results containing detailed reverse geocode information. See https://lbs.amap.com/api/webservice/guide/api/georegeo for more information.
extractCoord
## Not run:
library(amapGeocode)
# Before the `getLocation()` is executed,
# the token should be set by `option(amap_key = 'key')`
# or set by key argument in `getLocation()`
# Get reverse-geocode as a table
getLocation(104.043284, 30.666864)
# Get reverse-geocode as a XML
getLocation("104.043284, 30.666864", output = "XML")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.