简体   繁体   English

Google自动填充广告国家/地区过滤器无法在iOS中使用

[英]Google Autocomplete place country filter not working in iOS

let autocompleteController = GMSAutocompleteViewController()
autocompleteController.autocompleteFilter?.country = "AU"
autocompleteController.delegate = self
self.presentViewController(autocompleteController, animated: true, completion: nil)

I need only filter data for Australia so I want to filter data by country. 我只需要过滤澳大利亚的数据,所以我想按国家/地区过滤数据。

The autocompleteFilter property is nil by default, so the line 默认情况下,autocompleteFilter属性为nil,因此该行

autocompleteController.autocompleteFilter?.country = "AU"

doesn't do anything. 什么都不做 Do it like this instead: 这样做是这样的:

let filter = GMSAutocompleteFilter()
filter.country = "AU"
autocompleteController.autocompleteFilter = filter

 GMSAutocompleteViewController *controller = [[GMSAutocompleteViewController alloc]init]; GMSAutocompleteFilter *filter = [[GMSAutocompleteFilter alloc]init]; controller.delegate = self; filter.country = @"IN"; controller.autocompleteFilter = filter; 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在谷歌地图 ios sdk 中过滤自动完成国家? - How to filter autocomplete country in Google maps ios sdk? 如何使用 Google 自动完成位置 api ios sdk 获得特定于国家/地区的结果? - How to get country specific result with Google autocomplete place api ios sdk? 谷歌搜索在ios中放置特定于国家/地区的自动填充功能 - google search places autocomplete specific to country in ios 如何在Google Places自动完成iOS中显示距离 - how to show distance in google place autocomplete iOS 将谷歌自动完成限制为仅限城市和国家 iOS Swift - Limit google autocomplete to City and Country only iOS Swift Swift Google Place Autocomplete在Google Maps中不起作用 - Swift Google Place Autocomplete not working wtih Google Maps iOS中自动完成地点搜索Google API的纬度和经度 - Latitude & Longitude for Autocomplete place search google API in ios 如何使用Google自动完成地点api iOS获取特定于州的结果? - How to get State specific result with Google autocomplete place api ios? Google将iOS的自动完成功能置于100%不能正常运行的状态 - Google places autocomplete for ios not working 100% of the time 我可以使用Google Place自动完成功能在iOS上搜索位置,然后在Apple Maps上放置结果吗? - Can I use google place autocomplete to search for locations on iOS, then place results on Apple Maps?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM