iT邦幫忙

0

R程式run語法出現錯誤訊息

r
  • 分享至 

  • twitterImage

執行下面兩行語法出現錯誤訊息,不知道如何修正
語法:
library(ggmap)
map.taiwan <- get_map(location="Taiwan", zoom=8)
錯誤訊息:
Error in download.file(url, destfile = tmp, quiet = !messaging, mode = "wb") :
cannot open URL 'http://maps.googleapis.com/maps/api/staticmap?center=Taiwan&zoom=8&size=640x640&scale=2&maptype=terrain&language=en-EN&sensor=false'
In addition: Warning message:
In download.file(url, destfile = tmp, quiet = !messaging, mode = "wb") :
cannot open URL 'http://maps.googleapis.com/maps/api/staticmap?center=Taiwan&zoom=8&size=640x640&scale=2&maptype=terrain&language=en-EN&sensor=false': HTTP status was '403 Forbidden'

froce iT邦大師 1 級 ‧ 2018-12-03 15:55:38 檢舉
HTTP status was '403 Forbidden'就是你沒權力去看那個網頁。
用google的api要申請token啊。
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

0
海綿寶寶
iT邦大神 1 級 ‧ 2018-12-04 09:42:13

1.先看一下這篇
2.再到這邊申請 Google API key
3.最後,照這邊寫的增加一些程式

我要發表回答

立即登入回答