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
 The type filter applied to an autocomplete request to restrict results to different types.
NSString * country
 The country to restrict results to.
NSArray< NSString * > * countries
 The countries to restrict results to.
CLLocation * origin
 The staight 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 the place results to.

Property Documentation

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

The type filter applied to an autocomplete request to restrict results to different types.

Default value is kGMSPlacesAutocompleteTypeFilterNoFilter.

- (NSString*) country [read, write, copy]

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.
- (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 country property if that is set.
- (CLLocation*) origin [read, write, assign]

The staight 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. Use the helper GMSPlaceRectangularLocationOption(CLLocationCoordinate2D northEastBounds, CLLocationCoordinate2D southWestBounds).

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

The optional location restriction to limit the place results to. Use the helper GMSPlaceRectangularLocationOption(CLLocationCoordinate2D northEastBounds, CLLocationCoordinate2D southWestBounds).