你可以在这里找到 - http://journal.r-project.org/archive/2013-1/kahle-wickham.pdf - 有办法将shapefile放入ggmap。
您需要做的就是:
# read data into R (for example - your states)
shapefile <- readShapeSpatial(’tr48_d00.shp’,proj4string = CRS("+proj=longlat +datum=WGS84"))
# convert to a data.frame using fortify function
data <- fortify(shapefile)
#and plot your data using qmap or ggmap
qmap(’texas’, zoom = 6, maptype = ’satellite’) + geom_polygon(aes(x = long, y = lat, group = group), data = data,colour = ’white’, fill = ’black’, alpha = .4, size = .3)