我有一个包含三列的简单数据表:region,lat和lon。我的观点来自遍布非洲和欧亚大陆的人口。
我试图在世界地图(卫星图像)上按地区绘制点和颜色代码:
library(ggmap)
map <- get_map(maptype="satellite",c(lon = 40.29236929, lat = 27.51909309),zoom=2)
ggmap(map)
# Map from URL : http://maps.googleapis.com/maps/api/staticmap?center=27.519093,40.292369&zoom=2&size=640x640&scale=2&maptype=satellite&language=en-EN&sensor=false
当我绘制时,我只得到一个灰色背景而不是map from the URL以及以下警告:
Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf
3: In min(x) : no non-missing arguments to min; returning Inf
4: In max(x) : no non-missing arguments to max; returning -Inf
我正在运行最新版本的R,我已经更新了包。
如果我将其设置为zoom=3
,地图的边缘将完全切断。无论如何,我可以使用zoom=2
获取完整的世界地图以使用ggmap
吗?也许让它制作一个非方形地图?