![](/img/trans.png)
[英]How to get country specific result with Google autocomplete place api ios sdk?
[英]How to get State specific result with Google autocomplete place api ios?
我正在使用下面的代碼來篩選國家/地區數據,但我獲得了成功。 我正在Xcode 8.0中開發Swift 2.3。
let autocompleteController = GMSAutocompleteViewController()
autocompleteController.delegate = self
let filter = GMSAutocompleteFilter()
filter.type = .Address
filter.country = "US"
autocompleteController.autocompleteFilter = filter
self.presentViewController(autocompleteController, animated: true, completion: nil)
我想要更多。
1)我想過濾美國的特定州數據(如密歇根州),所以我知道如何過濾它。 我曾盡最大努力遭受互聯網苦難,但我無法獲得它。
祝你回復
獲取特定位置(在您的情況下為密歇根州)的地理位置,並設置半徑並在parameters部分中應用strictBounds,它將僅顯示該區域內的結果。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.