AI-generated Key Takeaways
- 
          GMSPlaceSearchByTextRequestobjects define parameters for text-based searches using the Google Places API.
- 
          Requests must include a text query and desired place properties to return specific details about places. 
- 
          Developers can customize searches by setting optional parameters like location bias, rating filters, price level, and more. 
- 
          Location restrictions can be applied, limiting results to a defined area. 
- 
          The results can be ranked by prominence or by distance to a specified location using rankPreference.
GMSPlaceSearchByTextRequest
@interface GMSPlaceSearchByTextRequest : NSObjectRepresents a text search request definition to be sent via GMSPlacesClient.
- 
                  
                  Instantiates a GMSPlaceSearchByTextRequestwith a text query and place properties to return.DeclarationSwift init(textQuery: String, placeProperties: [String])Objective-C - (nonnull instancetype)initWithTextQuery:(nonnull NSString *)textQuery placeProperties: (nonnull NSArray<NSString *> *)placeProperties;ParameterstextQueryThe string query for the search request. placePropertiesThe array of GMSPlacePropertythat should be included in place results. Must not be empty. An empty list will result in an error when trying to send the request.
- 
                  
                  Unavailable Default init is not available. Please use the designated initializer. DeclarationObjective-C - (nonnull instancetype)init;
- 
                  
                  The requested place type. See https://developers.google.com/maps/documentation/places/web-service/search-textual#supported-types for the most up-to-date list of supported types available DeclarationSwift var includedType: String? { get set }Objective-C @property (nonatomic, copy, nullable) NSString *includedType;
- 
                  
                  The maximum number of results to return. Allows values between 1 and 20. The allowed range of this field can be found at https://developers.google.com/maps/documentation/places/web-service/search-textual#maxresultcount. Defaults to the upper limit. DeclarationSwift var maxResultCount: Int32 { get set }Objective-C @property (nonatomic) int maxResultCount;
- 
                  
                  The minimum average user rating for places to be included in the results. Rating will be within a range between 0.0 and 5.0. The specified rating will be rounded up to the nearest 0.5. See GMSPlacerating property.Defaults to 0.0. DeclarationSwift var minRating: Float { get set }Objective-C @property (nonatomic) float minRating;
- 
                  
                  Filter results to places that are currently open. Defaults to true. DeclarationSwift var isOpenNow: Bool { get set }Objective-C @property (nonatomic) BOOL isOpenNow;
- 
                  
                  The array of GMSPlacePropertythat should be included in place results.DeclarationSwift var placeProperties: [String] { get }Objective-C @property (nonatomic, readonly) NSArray<NSString *> *_Nonnull placeProperties;
- 
                  
                  An Array of the GMSPlacesPriceLevelvalues that should filter the places included in the results.Any combination of price levels can be selected; default is all price levels. DeclarationSwift var priceLevels: [NSNumber]? { get set }Objective-C @property (nonatomic, nullable) NSArray<NSNumber *> *priceLevels;
- 
                  
                  The GMSPlaceSearchByTextRankPreferenceused to sort the results returned from the request.DeclarationSwift var rankPreference: GMSPlaceSearchByTextRankPreference { get set }Objective-C @property (nonatomic) GMSPlaceSearchByTextRankPreference rankPreference;
- 
                  
                  The unicode country/region code (CLDR) of the location where the request is coming from. The region may affect the format and type of data returned. If no code is provided, there is no bias towards any country/region. See https://unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html for region codes. DeclarationSwift var regionCode: String? { get set }Objective-C @property (nonatomic, copy, nullable) NSString *regionCode;
- 
                  
                  Defines whether only results of includedTypeshould be returned.Default value is false. DeclarationSwift var isStrictTypeFiltering: Bool { get set }Objective-C @property (nonatomic) BOOL isStrictTypeFiltering;
- 
                  
                  The text query for the search. DeclarationSwift var textQuery: String { get }Objective-C @property (nonatomic, copy, readonly) NSString *_Nonnull textQuery;
- 
                  
                  The biased region to search. This location serves as a bias, which means there is a preference for results in the given location. A locationRestriction or a locationBias must be set when performing a search request. If set along with locationRestriction, this will be ignored. DeclarationSwift var locationBias: (any GMSPlaceLocationBias)? { get set }Objective-C @property (nonatomic, nullable) id<GMSPlaceLocationBias> locationBias;
- 
                  
                  The restricted region to search. This location serves as a restriction which means results outside the given location will not be returned. A locationRestriction or a locationBias must be set when performing a search request. Cannot be used with locationBias. The locationRestriction for text search only supports GMSPlaceRectangularLocationOption.DeclarationSwift var locationRestriction: (any GMSPlaceLocationRestriction)? { get set }Objective-C @property (nonatomic, nullable) id<GMSPlaceLocationRestriction> locationRestriction;
- 
                  
                  Whether pure service area businesses should be included 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. Places will not return fields including location,plusCode, and other location related fields for these businesses.Default value is false. DeclarationSwift var shouldIncludePureServiceAreaBusinesses: Bool { get set }Objective-C @property (nonatomic) BOOL shouldIncludePureServiceAreaBusinesses;