GMSAutocompleteFilter Class Reference

GMSAutocompleteFilter Class Reference

Overview

This class represents a set of restrictions that may be applied to autocomplete requests.

This allows customization of autocomplete suggestions to only those places that are of interest.

Properties

GMSPlacesAutocompleteTypeFilter type
 DEPRECATED.
NSArray< NSString * > * types
 The filter applied to an autocomplete request to restrict results using up to 5 different place types.
NSString * country
 DEPRECATED.
NSArray< NSString * > * countries
 The countries to restrict results to.
CLLocation * origin
 The straight line distance origin location for measuring the straight line distance between the origin location and autocomplete predictions.
id< GMSPlaceLocationBiaslocationBias
 The optional location bias to prefer place results near the location.
id< GMSPlaceLocationRestrictionlocationRestriction
 The optional location restriction to limit place results.
NSString * regionCode
 regionCode affects address formatting, result ranking, and potentially hiding or showing certain results.
int32_t inputOffset
 inputOffset is the character offset of the input that indicates where the completions may start from.

Property Documentation

- (GMSPlacesAutocompleteTypeFilter) type [read, write, assign]

DEPRECATED.

The type filter applied to an autocomplete request to restrict results to different types. Default value is kGMSPlacesAutocompleteTypeFilterNoFilter.

Note:
Ignored if the "types" property is set.
This is deprecated. type property is deprecated in favor of types.
- (NSArray<NSString *>*) types [read, write, assign]

The filter applied to an autocomplete request to restrict results using up to 5 different place types.

Note:
This API can take an array of up to 5 entries. If you are using GMSAutocompleteRequest, this API can take types from table_A. Otherwise, take data from table_1 or table_2, but only a single entry in table_3. Default value is null, which means no filters specified. Overrides the deprecated "type" property if this is set.
- (NSString*) country [read, write, copy]

DEPRECATED.

The country to restrict results to. This should be a ISO 3166-1 Alpha-2 country code (case insensitive). If nil, no country filtering will take place.

Note:
Ignored if the "countries" property is set.
This is deprecated. country property is deprecated in favor of countries.
- (NSArray<NSString *>*) countries [read, write, copy]

The countries to restrict results to.

This should be a ISO 3166-1 Alpha-2 country code (case insensitive). Supports up to 5 countries to filter. If nil, no country filtering will take place.

Note:
Overrides the deprecated "country" property if that is set.
- (CLLocation*) origin [read, write, assign]

The straight line distance origin location for measuring the straight line distance between the origin location and autocomplete predictions.

- (id<GMSPlaceLocationBias>) locationBias [read, write, assign]

The optional location bias to prefer place results near the location.

- (id<GMSPlaceLocationRestriction>) locationRestriction [read, write, assign]

The optional location restriction to limit place results.

- (NSString*) regionCode [read, write, assign]

regionCode affects address formatting, result ranking, and potentially hiding or showing certain results.

- (int32_t) inputOffset [read, write, assign]

inputOffset is the character offset of the input that indicates where the completions may start from.