r - ggmap不显示 map

标签 r ggplot2 ggmap

我有以下代码:

library(ggmap) 
ggmap(get_map(location=c(lon = 5.218922, lat = 52.342366), zoom =14))

通过我的帐户,它应该可以正常工作,但是我只得到标准ggplot2图像(灰色背景等),并带有正确的轴,但未显示 map :

当我在工作目录中查找时,确实找到了一个名为“ggmapTemp”的文件,该文件中包含正确的映射。但是ggplot2没有显示该映射。

我与RStudio合作,但对我的工作电脑拥有有限的权利。这可能是 map 显示不正确的原因吗?我的RStudio版本是0.96.316,R是R-2.15.1。
> sessionInfo()
 R version 2.15.1 (2012-06-22)
 Platform: x86_64-pc-mingw32/x64 (64-bit)

 locale:
 [1] LC_COLLATE=Dutch_Netherlands.1252  LC_CTYPE=Dutch_Netherlands.1252   
 [3] LC_MONETARY=Dutch_Netherlands.1252 LC_NUMERIC=C                      
 [5] LC_TIME=Dutch_Netherlands.1252    

 attached base packages:
 [1] stats     graphics  grDevices utils     datasets  methods   base     

 other attached packages:
 [1] ggmap_2.1     ggplot2_0.9.1

 loaded via a namespace (and not attached):
 [1] colorspace_1.1-1   dichromat_1.2-4    digest_0.5.2       grid_2.15.1       
 [5] labeling_0.1       MASS_7.3-18        memoise_0.1        munsell_0.3       
 [9] plyr_1.7.1         png_0.1-4          proto_0.3-9.2      RColorBrewer_1.0-5
 [13] reshape2_1.2.1     RgoogleMaps_1.2.0  rjson_0.2.9        scales_0.2.1      
 [17] stringr_0.6        tools_2.15.1   

更新:
我的sessionInfo()在答案1之后:
sessionInfo()

 attached base packages:
 [1] stats     graphics  grDevices utils     datasets  methods   base     

 other attached packages:
 [1] mapproj_1.1-8.3 maps_2.2-6      ggmap_2.1       ggplot2_0.9.1  

 loaded via a namespace (and not attached):
 [1] colorspace_1.1-1    dichromat_1.2-4     digest_0.5.2        grid_2.15.1        
 [5] labeling_0.1        MASS_7.3-20         memoise_0.1         munsell_0.3        
 [9] plyr_1.7.1          png_0.1-4           proto_0.3-9.2       RColorBrewer_1.0-5 
 [13] reshape2_1.2.1      RgoogleMaps_1.2.0.2 rjson_0.2.9         scales_0.2.1       
 [17] stringr_0.6.1       tools_2.15.1  

按照要求:
capabilities()
jpeg      png     tiff    tcltk      X11     aqua http/ftp  sockets   libxml     fifo 
TRUE     TRUE     TRUE     TRUE    FALSE    FALSE     TRUE     TRUE     TRUE    FALSE 
cledit    iconv      NLS  profmem    cairo 
TRUE     TRUE     TRUE     TRUE     TRUE 

最佳答案

我遇到了这个错误,但是现在我已升级到ggmap(V2.3)的最新版本,此问题已得到解决。

关于r - ggmap不显示 map ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12157291/

相关文章:

r - 源 = "dsk"不适用于 ggmap 库中的地理编码功能

r - seq 和 == 运算符的神秘行为。精度问题?

r - 多列从长数据到宽数据

R ggplot背景图像未显示

r - ggplot 分面图表重新排序未按预期工作

R ggmap以180度经度为中心

r - 叠加了geom_map的ggmap

r - 复杂热图突出显示特定行

r - 编辑shiny.tag元素

r - 如何使用scale_fill_gradient指定 "low"和 "high"并在两端获得两个音阶