AI-generated Key Takeaways
-
GMSPlacesAutocompleteTypeFilter
is an enum used to restrict the results of a Places Autocomplete request. -
It offers various filter options like
noFilter
,geocode
,address
,establishment
,region
, andcity
. -
These filters allow developers to specify the type of results they want, such as businesses, addresses, or geographical regions.
-
Each filter corresponds to a specific set of place types defined by the Google Places API.
-
By applying these filters, developers can refine the autocomplete suggestions and improve the user experience.
GMSPlacesAutocompleteTypeFilter
enum GMSPlacesAutocompleteTypeFilter : NSInteger {}
The type filters that may be applied to an autocomplete request to restrict results to different types.
-
All results.
Declaration
Swift
case noFilter = 0
Objective-C
kGMSPlacesAutocompleteTypeFilterNoFilter
-
Geocoding results, as opposed to business results.
Declaration
Swift
case geocode = 1
Objective-C
kGMSPlacesAutocompleteTypeFilterGeocode
-
Geocoding results with a precise address.
Declaration
Swift
case address = 2
Objective-C
kGMSPlacesAutocompleteTypeFilterAddress
-
Business results.
Declaration
Swift
case establishment = 3
Objective-C
kGMSPlacesAutocompleteTypeFilterEstablishment
-
Results that match the following types: “locality”, “sublocality” “postal_code”, “country”, “administrative_area_level_1”, “administrative_area_level_2”
Declaration
Swift
case region = 4
Objective-C
kGMSPlacesAutocompleteTypeFilterRegion
-
Results that match the following types: “locality”, “administrative_area_level_3”
Declaration
Swift
case city = 5
Objective-C
kGMSPlacesAutocompleteTypeFilterCity