Description Usage Arguments Value Note References Examples
Working function for synthesize_api()
. It will call
lower functions synthesize_gaode_api_geocode()
or
synthesize_gaode_api_revgeocode()
or synthesize_gaode_api_convcoord()
.
1 2 3 4 5 6 7 8 9 10 11 12 13 | synthesize_gaodemap_api(url_body, api = c("geocode", "revgeocode",
"convcoord"), use_curl = FALSE, ...)
synthesize_gaode_api_geocode(url_body, batch = FALSE, city = NULL,
use_curl = FALSE, ...)
synthesize_gaode_api_revgeocode(url_body, batch = FALSE,
extensions = c("all", "base"), poitype = NULL, radius = NULL,
roadlevel = NULL, homeorcorp = NULL, use_curl = FALSE, ...)
synthesize_gaode_api_convcoord(url_body, batch = FALSE,
coord_from = c("WGS-84", "BD-09", "GCJ-02"), coord_to = c("GCJ-02",
"BD-09", "WGS-84"), use_curl = FALSE, ...)
|
url_body |
character, the leading argument in the API URL. If you want to use batch mode, you can synthesize them with pipe "|" (no more than 10 per batch). E.g., "beijing|tianjin|shanghai". |
api |
character, 'geocode', 'revgeocode', 'convcoord'. |
use_curl |
logical, whether use |
... |
other arguments to pass to the function, e.g., |
batch |
logical, for geocoding, If use batch inquery mode. Default FALSE. |
city |
character, for geocoding. A valid Chinese city name to limit results. |
extensions |
character, 'all' or 'base', for revgeocode. Return basic info ('base') or base+additional info ('all'). Default "all". |
poitype |
character, for revgeocode. One or more POI type codes (separated
by a pipe '|'). The valid POI type codes refers to
https://lbs.amap.com/api/webservice/download.
It will not take effect when applying batch mode (multiple |
radius |
numeric (0-3000), for revgeocode. The radius (m) for calling back pois. Default NULL (1000). |
roadlevel |
numeric 0 or 1, for revgeocode. Return all the roads (0) or main roads only (1) |
homeorcorp |
numeric 0-2, for revgeocode. Order the callback pois,
Default NULL (0). |
coord_from |
character, for conv coord. 'BD-09', 'GCJ-02', or 'WGS-84'. Default 'GCJ-02'. |
coord_to |
character, for conv coord. 'BD-09', 'GCJ-02', or 'WGS-84'. Only 'GCJ-02' is now supported. |
A url
object for get_api_data()
use.
When key
is omitted or set NULL, the function will search for it
in the cache. If nothing is found, a GUI wizard will be launched for you to
input the API key. If you want to bypass API key, set key
= NA.
Gaode map API documentation: https://lbs.amap.com/api/webservice/guide/api
1 2 3 4 | ## Not run:
synthesize_gaodemap_api("<Address>", key="<YOUR GAODEMAP KEY>")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.