Description Usage Arguments Details Value Note Author(s) References Examples
A function to perform the Google Geolocation API call, and return the longitude and latitude coordinates of the query location.
1 | geoloc(address, apikey)
|
address |
query address (string). Do not use commas, and zip codes are not required, e.g. "1600 Pennsylvania Ave Washington DC". |
apikey |
your Google API key (string) |
Use of this function requires a Google API key, which is different from the Walk Score API key. Get one here: http://code.google.com/apis/maps/signup.html
Returns an object of class GoogleGeoloc
, basically a list of the following elements:
coordinates |
A vector of two numbers, the first representing the longitude and the second representing the latitude. |
accuracy |
Accuracy rating of geolocation. |
city |
City containing the requested address |
state |
State containing the requested address |
country |
Country containing the requested address |
For description of Google Geolocation see here: http://code.google.com/apis/gears/api_geolocation.html
John Whalen
http://code.google.com/apis/gears/api_geolocation.html
1 2 3 4 | ## Not run:
geoloc("350 5th Avenue New York NY","your Google API key")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.