谷歌附近的地方搜索结果“无效请求”

时间:2017-04-02 22:06:09

标签: search

我正在使用Google附近的搜索API。

这是我的网址:

  

https://maps.googleapis.com/maps/api/place/nearbysearch/xml?key=&安培;位置= 30.2981490,-97.7234120&安培;类型=大气压&安培;语言= EN&安培; rankby =距离

我在Ruby中使用

调用它
  

curl #{url}

无论我改变什么,位置,类型,等级到半径,我都会得到:

  

INVALID_REQUEST

我错过了什么?

1 个答案:

答案 0 :(得分:0)

更改查询字符串的顺序。它起作用了

https://maps.googleapis.com/maps/api/place/nearbysearch/xml?type=atm&rankby=distance&location=30.2981490,-97.7234120&language=en&key=api_key