Foursquare Explore API 半径参数不起作用

标签 foursquare

当您指定半径时,将探索端点与 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/

相关文章:

html - 谷歌地图作为 foursquare 上的固定背景

ios - 有没有办法在没有 oauth token 的情况下获取 Foursquare 照片。 (只有 App_ID 和 App_Secret)?

c# - 适用于 .net 的 Foursquare SDK

ios - 在 Foursquare "Das-Quadrat"iOS API 包装器中使用 categoryId 作为搜索过滤器

iphone - Foursquare API - field 搜索

foursquare - 可以在网站上添加 Foursquare 签到功能吗?

javascript - API Foursquare javascript 不起作用

ajax - 为什么有 Foursquare v2 API javascript 身份验证方法?

PHP Foursquare API 返回 Null 到 venues/search