gpt4 book ai didi

Foursquare Explore API 半径参数不起作用

转载 作者:行者123 更新时间:2023-12-02 00:13:07 26 4
gpt4 key购买 nike

当您指定半径时,将探索端点与 near 和 ll 结合使用会给出不同的结果。

使用 ll 时,半径按预期工作。但是当查询使用 near 时,它似乎忽略了 radius 参数。

我的查询(没有客户端 ID 和密码): https://api.foursquare.com/v2/venues/explore?near=Menlo%20Park%20California&radius=250&section=coffee&v=20130101

https://api.foursquare.com/v2/venues/explore?ll=37.45383,-122.18219&radius=250&section=coffee&v=20130101

第一个覆盖半径参数并在响应中显示“suggestedRadius”:7924第二个像预期的那样返回“suggestedRadius”:250。

我做错了什么吗?还有其他人看到过这种行为吗?
有没有办法可以正确使用“近”参数和半径?

谢谢!

最佳答案

radius 参数在与 near 一起使用时无效。例如,此查询 https://api.foursquare.com/v2/venues/explore?near=Menlo%20Park%20California&radius=10&section=coffee&v=20130101或者在没有 radius 参数的情况下运行它仍然会返回与原始查询相同的结果。

如果你想达到类似的效果,也许可以通过提供邮政编码等方式缩小 near 参数的范围。

关于Foursquare Explore API 半径参数不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14512776/

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