题
添加预期的类型参数更改响应以意想不到的方式。
两个请求应该用名称返回:“豪豪的公园”,因为它是一个类型的公园。而且有趣的是,增加半径= 500 将带回预期的结果。但是,它是如何在没有类型参数和相同的半径的第一个位置返回它?
解决方案
This is due to the way the Google Places API processes Search Requests.
The Places API will return up to 20 establishment results within the specified radius. Additionally, area identity results may be returned to to help identify the area the establishments are located.
If no type has been specified in the Places API Search Request, these area identity results are not strictly limited to the radius specified in the request, however when a type has been specified, additional area identity results are strictly limited to the radius specified in the request.
不隶属于 StackOverflow