Google 地图查找地点 API 位置偏差导致结果为零

Google Maps Find Place API locationbias causing zero results

我正在尝试使用“查找地点”的位置偏向功能 API 为我的搜索提供更相关的结果。我已经尝试了一个点和一个矩形,在这两种情况下我的查询 returns 结果为零。但是,如果我完全消除偏见,我确实会得到结果。为什么我知道在矩形边界内的位置没有被返回?此外,该字段称为 locationbias,这意味着它会更喜欢靠近该位置的地方,但不会强制严格限制边界,所以为什么我得到零结果?

这是一个 GET 示例:https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=Ariel%20Dunes%201%20Unit%20308%20Seascape%20Resort&inputtype=textquery&locationbias=rectangle%3A30.119056%2C-86.527098%7C30.444872%2C-85.705723&fields=geometry%2Flocation%2Cname%2Cplace_id

回复:

{ "candidates" : [], "status" : "ZERO_RESULTS"}

没有位置偏差:https://maps.googleapis.com/maps/api/place/findplacefromtext/json?inputtype=textquery&fields=geometry%2Flocation%2Cname%2Cplace_id&input=Ariel%20Dunes%201%20Unit%20308%20Seascape%20Resort

回应: { "candidates" : [ { "geometry" : { "location" : { "lat" : 30.377608, "lng" : -86.366795 } }, "name" : "Ariel Dunes I (ADI) at Seascape Resort", "place_id" : "ChIJF5B7IoRbkYgRQWjAZv0-wUI" } ], "status" : "OK" }

为清楚起见,这是上面使用的解码位置偏差:rectangle:30.119056,-86.527098|30.444872,-85.705723

根据 docs 这应该是矩形的西南角,然后是矩形的东北角。

问题是由于我使用了 Postman。邮递员隐式编码查询字符串。禁用此功能允许我在形状和纠正行为的坐标之间使用文字冒号。