【问题标题】:googleway, the radar argument is now deprecatedgoogleway,雷达参数现在已弃用
【发布时间】:2019-12-15 14:06:40
【问题描述】:

尝试在 r 中使用 googleway 包列出指定位置半径内的退休村。获取雷达参数现在已弃用错误消息,因此结果为空。

library(googleway)
a <- google_places(location = c(-36.796578,174.768836),search_string = "Retirement Village",radius=10000, key = "key")
a$results$name
```

#Would expect this to give me retirement villages within 10km radius, instead get error message

```> library(googleway)
> a <- google_places(location = c(-36.796578,174.768836),search_string = "Retirement Village",radius=10000, key = "key")
The radar argument is now deprecated
> a$results$name
NULL
```

【问题讨论】:

  • 您是否提供了 API 密钥?
  • 是的,我有,这里用'key'替换
  • 您的代码对我有用。我认为您需要进入谷歌云平台并为您的密钥启用地点 API。

标签: r googleway


【解决方案1】:

您编写的代码没有任何问题,您收到的“消息”不是错误,而是一条消息,但它可能应该被删除 - 我已经写了一个issue to remove it here

a <- google_places(
  location = c(-36.796578,174.768836)
  , search_string = "Retirement Village"
  , radius = 10000
  , key = "key"
  )

place_name( a ) 

# [1] "Fairview Lifestyle Village"                       "Eastcliffe Retirement Village"                   
# [3] "Meadowbank Retirement Village"                    "The Poynton - Metlifecare Retirement Village"    
# [5] "The Orchards - Metlifecare Retirement Village"    "Bupa Hugh Green Care Home & Retirement Village"  
#  [7] "Bert Sutcliffe Retirement Village"                "Grace Joel Retirement Village"                   
#  [9] "Bupa Remuera Retirement Village and Care Home"    "7 Saint Vincent - Metlifecare Retirement Village"
# [11] "Remuera Gardens Retirement Village"               "William Sanders Retirement Village"              
# [13] "Puriri Park Retirement Village"                   "Selwyn Village"                                  
# [15] "Aria Bay Retirement Village"                      "Highgrove Village & Patrick Ferry House"         
# [17] "Settlers Albany Retirement Village"               "Knightsbridge Village"                           
# [19] "Remuera Rise"                                     "Northbridge Residential Village" 

您确定您使用的 API 密钥已在 Places API 上启用吗?

【讨论】:

  • 哎呀,我本可以发誓我做到了,但我发现我没有。非常感谢您的快速修复
猜你喜欢
  • 2021-01-06
  • 1970-01-01
  • 1970-01-01
  • 2013-12-12
  • 1970-01-01
  • 1970-01-01
  • 2015-03-13
  • 1970-01-01
  • 2023-01-23
相关资源
最近更新 更多