geocode {mapmisc} | R Documentation |
Uses the dismo package to geocode with Google
geocode(x, oneRecord=FALSE, extent=NULL, progress='', ...)
x |
vector of character strings to search for |
oneRecord |
see |
extent |
an Extent object, or any object from which an Extent can be obtained. |
progress |
see |
... |
additional arguments passed to |
If the option
options()$mapmiscCachePath
is set, it will be used
to specify the folder to save downloaded
data.
A SpatialPointsDataFrame
with coordinates in the
projection of extent
if possible, or long-lat
otherwise.
## Not run: if (requireNamespace("dismo", quietly = TRUE)) { cities=geocode('Ulan batar') mytiles = openmap(cities, buffer=800*1000) map.new(mytiles) plot(mytiles, add=TRUE) points(cities, col='red') text(cities, labels=cities$originalPlace, col='red',pos=4) } ## End(Not run)