草庐IT

autocompleteFilter

全部标签

android - android中autocompleteFilter的国家限制

我正在研究googleplacesapi。我使用AutoComplteFilter在搜索结果中设置过滤器。如本lynk中所述我尝试将我的结果限制在指定的国家/地区内。但是我无法在AutoCompleteFilter.Builderapi中访问此方法setCountry(Stringcountry)。我错过了什么吗?如何使用这个方法?仅供引用,我使用的是9.0.2版的googleplayservice。 最佳答案 https://maps.googleapis.com/maps/api/place/autocomplete/json?

java - Android AutocompleteFilter 的多个国家

我的应用程序必须为GoogleAPI提供一个地点自动完成器。但是应该只显示选定国家/地区的位置。例如,只有美国和英国的地址。这里使用的过滤器代码fragment:AutocompleteFilterautocompleteFilter=newAutocompleteFilter.Builder().setTypeFilter(Place.TYPE_COUNTRY).setCountry("US").build();是否有任何解决方案可以将方法setCountry()设置为多个县?我试过.setCountrie("US,UK")......但这行不通。有什么想法吗?

android - 如何使用 Android Places API AutocompleteFilter

我正在尝试在我的应用程序中实现适用于android的新PlacesAPI,但我似乎无法弄清楚如何为请求设置过滤器。这是我的代码。LatLngsouthWest=newLatLng(85,-180);LatLngnorthEast=newLatLng(-85,180);LatLngBoundsbounds=newLatLngBounds(southWest,northEast);AutocompleteFilterfilter=AutocompleteFilter.create(WHATSHOULDGOHERE?);PendingResultresult=Places.GeoDataAp