Learn R Programming

mapmisc (version 1.7.0)

geocode: Georeferencing with Google

Description

Uses the dismo package to geocode with Google

Usage

geocode(x, oneRecord=FALSE, extent=NULL, progress='', ...)

Arguments

x

vector of character strings to search for

oneRecord
extent

an Extent object, or any object from which an Extent can be obtained.

progress
...

additional arguments passed to geocode

Value

A SpatialPointsDataFrame with coordinates in the projection of extent if possible, or long-lat otherwise.

Details

If the option options()$mapmiscCachePath is set, it will be used to specify the folder to save downloaded data.

See Also

geocode

Examples

Run this code
# NOT RUN {

# }
# 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)

}
# }
# NOT RUN {

# }

Run the code above in your browser using DataLab