gpt4 book ai didi

google-maps - 没有类型属性的 Google Places API INVALID_REQUEST

转载 作者:行者123 更新时间:2023-12-01 10:53:22 26 4
gpt4 key购买 nike

至少这个应该很容易让你验证。此请求返回 INVALID_REQUEST :

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=51.509980,-0.133700&sensor=true&rankby=distance&key=[api_key]

但是这个有效(完全相同,但带有 types 参数):

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=51.509980,-0.133700&sensor=true&rankby=distance&key=[api_key]&types=food

在文档中它说类型不是必需的参数所以它是他们的 API 中的错误吗?

最佳答案

这不是错误而是预期的行为(我相信这是不一致的行为,但无论如何)。对于那些感兴趣的人,我在这里得到了答案:https://code.google.com/p/gmaps-api-issues/issues/detail?id=5456

  • distance. This option sorts results in ascending order by their distance from the specified location. Ranking results by distance will set a fixed search radius of 50km. One or more of keyword, name, or types is required.

关于google-maps - 没有类型属性的 Google Places API INVALID_REQUEST,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16826829/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com