2

我在 R 应用程序中绘制 ggmap,我的 serv.R 文件

mapImageData1 <- get_map(location = c(lon = -0.016179, lat = 51.538525),
                             color = "color",
                             source = "google",
                             maptype = "satellite",
                             zoom = 17)

    p<-ggmap(mapImageData1,
          extent = "device",
          ylab = "Latitude",
          xlab = "Longitude")
    print(p)

用户界面上显示以下错误

Error:cannot open URL 'http://maps.googleapis.com/maps/api/staticmap?center=51.538525,-0.016179&zoom=17&size=%20640x640&scale=%202&maptype=satellite&sensor=false'

并且在应用程序文件夹中生成“ggmapTemp.png”,但它是 0 字节。

同样在日志中显示:

Warning in download.file(url, destfile = destfile, quiet = !messaging, mode = "wb") :
  unable to connect to 'maps.googleapis.com' on port 80.
Error in download.file(url, destfile = destfile, quiet = !messaging, mode = "wb") : 
  cannot open URL 'http://maps.googleapis.com/maps/api/staticmap?center=51.538525,-0.016179&zoom=17&size=%20640x640&scale=%202&maptype=satellite&sensor=false'

我已经通过 r 控制台检查了互联网工作。任何人都有任何想法

提前致谢..

4

0 回答 0