【问题标题】:Google Places Autocomplete API filter type "address" returns places of type "route" via iOS SDKGoogle Places Autocomplete API 过滤器类型“地址”通过 iOS SDK 返回“路线”类型的地点
【发布时间】:2017-08-30 08:53:15
【问题描述】:

Google Places API for iOS 版本:2.2.30010.0

代码:

let filter = GMSAutocompleteFilter()
filter.type = .address
filter.country = "us"
return filter

当使用 address 和国家 us 类型的过滤器搜索例如 Montrose 时,搜索结果显示:

国家过滤器有效,但类型过滤器显示route类型的结果。这是预期的行为吗?

Place Autocomplete docs 指定:

address 指示地点自动完成服务仅返回具有精确地址的地理编码结果。通常,当您知道用户将要查找完全指定的地址时,您会使用此请求。

也许我误解了精确地址是什么,但查询似乎应该只返回带有建筑物编号的结果。蒙特罗斯大街 22 号。

是否可以只返回有建筑编号的地方?

【问题讨论】:

标签: ios google-places-api google-places gmsplacepicker


【解决方案1】:

你只需要删除 filter.type = .address

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-08-23
    • 1970-01-01
    • 1970-01-01
    • 2015-07-10
    • 2017-08-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多