AutocompleteFilter
struct AutocompleteFilterextension AutocompleteFilter : SendableRepresents 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.
-
The coordinate region bias to prefer place results near the location.
Defaults to nil.
Declaration
Swift
var coordinateRegionBias: (any CoordinateRegionBias)? { get } -
The location bounds restriction to limit the place results to.
Defaults to nil.
Declaration
Swift
var coordinateRegionRestriction: (any CoordinateRegionRestriction)? { get } -
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. Defaults to nil.
Declaration
Swift
var countries: Set<String>? { get } -
init(types:countries:origin:coordinateRegionBias:coordinateRegionRestriction:regionCode:inputOffset:)
Declaration
Swift
@available(*, deprecated) init(types: Set<PlaceType>? = nil, countries: Set<String>? = nil, origin: CLLocation? = nil, coordinateRegionBias: (any CoordinateRegionBias)? = nil, coordinateRegionRestriction: (any CoordinateRegionRestriction)? = nil, regionCode: String? = nil, inputOffset: Int) -
init(types:countries:origin:coordinateRegionBias:coordinateRegionRestriction:regionCode:shouldIncludePureServiceAreaBusinesses:)
Declaration
Swift
init(types: Set<PlaceType>? = nil, countries: Set<String>? = nil, origin: CLLocation? = nil, coordinateRegionBias: (any CoordinateRegionBias)? = nil, coordinateRegionRestriction: (any CoordinateRegionRestriction)? = nil, regionCode: String? = nil, shouldIncludePureServiceAreaBusinesses: Bool = false) -
The character offset for the input string. Indicates the completion starting position.
This value will be ignored if:
- The
AutocompleteRequestinputOffsetis set. - Used in
placeAutocompleteorbasicPlaceAutocomplete.
Declaration
Swift
@available(*, deprecated, message: "Use AutocompleteRequest inputOffset instead.") var inputOffset: Int { get } - The
-
The origin location for measuring the straight line distance between the origin location and autocomplete predictions.
Defaults to nil.
Declaration
Swift
var origin: CLLocation? { get } -
Affects address formatting, result ranking, and potentially hiding or showing certain results.
Declaration
Swift
var regionCode: String? { get } -
Whether to include pure service area businesses in the results.
A pure service area business is a business that visits or delivers to customers directly, but does not serve customers at their business address. For example, businesses like cleaning services or plumbers. Those businesses do not have a physical address or location on Google Maps.
Default value is
false.Declaration
Swift
var shouldIncludePureServiceAreaBusinesses: Bool { get }