Description Usage Arguments Details Value Examples
Get the coordinates of an address using the Google Places API. Note: An API key must first be obtained from Google.
1 | geocodePlace(name, rough.crd, radius = 50000, key, result = 1, pause.time = 0.02)
|
name |
The name of the place/establishment to search for. |
rough.crd |
The rough coordinates of the location, e.g. the neighborhood
or city in which the place/establishment is located. For example:
|
radius |
The radius in meters from the rough coordinates to search within. Default is 50,000. |
key |
API key from the Google Places API. |
result |
Which search result to use. The default is the first result. |
pause.time |
Amount of time in seconds to wait after a request (if performing multiple requests in a loop). |
An API key must first be obtained to use the Google Places API.
By default the function returns the first result from the search. This can be
checked for accuracy by looking at the other components in the
result. If this is incorrect, the second result can be tried using
result = 2
.
crd |
A vector of the longitude and latitude of the place/establishment. |
name |
The name of the place/establishment returned by Google. |
types |
The types of the place/establishment |
vicinity |
The address of the place/establishment. |
1 2 3 4 5 6 | ## Not run:
geocodePlace("Madison Square Garden",
rough.crd = geocodeAddress("New York City")$crd,
key = YOUR.API.KEY)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.