地理编码,错误消息,(谷歌地图,google_geocode,api)

时间:2018-04-02 00:02:41

标签: r api google-maps geocode googleway

当我尝试以下代码时,我不断收到错误消息,错误消息是

  

" open.connection错误(con," rb"):     schannel:next InitializeSecurityContext失败:SEC_E_UNTRUSTED_ROOT(0x80090325) - 证书链由不受信任的机构颁发。"

然而,似乎我的代码错误,如果错误消息是由安全性或权限问题引起的,那么有人能给我解决方案来消除这些安全问题吗?

library(googleway)   
res <- google_geocode(address = "대한민국 경기도 안산시 단원구 성곡동 강촌로", language = "ko", key = <your_api_key>)

1 个答案:

答案 0 :(得分:1)

解决了,@SymbolixAU的所有权利

问题在于(公司)防火墙背后。在这种情况下,我们需要使用curl_proxy

library(googleway)
library(curl)
curl_proxy <- function(url, verbose = TRUE){
  proxy <- ie_get_proxy_for_url(url)
  h <- new_handle(verbose = verbose, proxy = proxy)
  curl(url, handle = h)
}


res <- google_geocode(address = "대한민국 경기도 안산시 ", language = "ko", key =     "api_key", curl_proxy = curl_proxy)