我在更改ggmap
的背景时遇到了问题。当我尝试更改maptype
时,它总是显示为terrain
。 我想将其更改为satellite
。有任何建议吗?这是我的代码:
library(ggmap)
# Long and Lat Coordinates
Cuba_all <- data.frame("Longitude" = c(-79.79623, -79.42313, -79.01722, -80.29218, -80.50040, -80.51981, -80.36674, -79.87957, -79.66906, -79.76122, -80.26587, -79.91689, -80.10454, -80.22530, -80.12910, -79.98889, -79.84307, -79.81694, -80.22201, -80.48088, -80.44482, -80.29068, -80.36213, -80.50879, -80.29634), "Latitude" = c(22.06622, 22.14845, 22.20900, 22.05258, 22.30107, 22.88154, 22.70679, 22.53541, 22.39237, 22.35697, 21.91868, 22.08949, 21.83760, 22.10561, 22.11061, 22.02766, 22.04936, 22.37516, 22.56684, 22.44313, 22.44416, 22.50470, 22.75872, 22.35473, 22.49178))
# Create Cuba Dimensions
sbbox <- make_bbox(lon = Cuba_all$Longitude, lat = Cuba_all$Latitude, f = .1)
sbbox
# Grab Map of Cuba
sq_map <- get_map(location = sbbox, source = "google", maptype = "satellite")
# Plot Map
ggmap(sq_map)