Overview
Represents a text search request definition to be sent via GMSPlacesClient
.
Public Member Functions | |
(instancetype) | - initWithTextQuery:placeProperties: |
Instantiates a GMSPlaceSearchByTextRequest with a text query and place properties to return. | |
Properties | |
NSString * | includedType |
Default init is not available. | |
int | maxResultCount |
The maximum number of results to return. | |
float | minRating |
The minimum average user rating for places to be included in the results. | |
BOOL | isOpenNow |
Filter results to places that are currently open. | |
NSArray< GMSPlaceProperty > * | placeProperties |
The array of GMSPlaceProperty that should be included in place results. | |
NSArray< NSNumber * > * | priceLevels |
An Array of the GMSPlacesPriceLevel values that should filter the places included in the results. | |
GMSPlaceSearchByTextRankPreference | rankPreference |
The GMSPlaceSearchByTextRankPreference used to sort the results returned from the request. | |
NSString * | regionCode |
The unicode country/region code (CLDR) of the location where the request is coming from. | |
BOOL | isStrictTypeFiltering |
Defines whether only results of includedType should be returned. | |
NSString * | textQuery |
The text query for the search. | |
id< GMSPlaceLocationBias > | locationBias |
The biased region to search. | |
id< GMSPlaceLocationRestriction > | locationRestriction |
The restricted region to search. |
Member Function Documentation
- (instancetype) initWithTextQuery: | (NSString *) | textQuery | |
placeProperties: | (NSArray< GMSPlaceProperty > *) | placeProperties | |
Instantiates a GMSPlaceSearchByTextRequest
with a text query and place properties to return.
- Parameters:
-
textQuery The string query for the search request. placeProperties The array of GMSPlaceProperty
that should be included in place results. Must not be empty. An empty list will result in an error when trying to send the request.
Property Documentation
- (NSString*) includedType [read, write, copy] |
Default init is not available.
Please use the designated initializer. 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
- (int) maxResultCount [read, write, assign] |
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.
- (float) minRating [read, write, assign] |
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 GMSPlace
rating property.
Defaults to 0.0.
- (BOOL) isOpenNow [read, write, assign] |
Filter results to places that are currently open.
Defaults to true.
- (NSArray<GMSPlaceProperty>*) placeProperties [read, assign] |
The array of GMSPlaceProperty
that should be included in place results.
- (NSArray<NSNumber *>*) priceLevels [read, write, assign] |
An Array of the GMSPlacesPriceLevel
values that should filter the places included in the results.
Any combination of price levels can be selected; default is all price levels.
- (GMSPlaceSearchByTextRankPreference) rankPreference [read, write, assign] |
The GMSPlaceSearchByTextRankPreference
used to sort the results returned from the request.
- (NSString*) regionCode [read, write, copy] |
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.
- (BOOL) isStrictTypeFiltering [read, write, assign] |
Defines whether only results of includedType
should be returned.
Default value is false.
- (NSString*) textQuery [read, copy] |
The text query for the search.
- (id<GMSPlaceLocationBias>) locationBias [read, write, assign] |
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.
- (id<GMSPlaceLocationRestriction>) locationRestriction [read, write, assign] |
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.