概要
GMSPlacesClient
で送信するテキスト検索リクエストの定義を表します。
パブリック メンバーの関数 | |
(instancetype) | - initWithTextQuery:placeProperties: |
テキストクエリで GMSPlaceSearchByTextRequest をインスタンス化し、返すプロパティを配置します。 | |
プロパティ | |
NSString * | includedType |
デフォルトの init を使用できない。 | |
整数 | maxResultCount |
返される結果の最大件数です。 | |
浮動小数点数 | minRating |
結果に含める場所の平均ユーザー評価の最小値。 | |
BOOL | isOpenNow |
現在営業中のお店やスポットに検索結果を絞り込めます。 | |
NSArray<GMSPlaceProperty >* | placeProperties |
プレイス結果に含める必要がある GMSPlaceProperty の配列。 | |
NSArray<NSNumber * >* | priceLevels |
結果に含める場所をフィルタする GMSPlacesPriceLevel 値の配列。 | |
GMSPlaceSearchByTextRankPreference | rankPreference |
リクエストから返された結果の並べ替えに使用する GMSPlaceSearchByTextRankPreference 。 | |
NSString * | regionCode |
リクエストの送信元の場所の Unicode 国/地域コード(CLDR)。 | |
BOOL | isStrictTypeFiltering |
includedType の結果のみを返すかどうかを定義します。 | |
NSString * | textQuery |
検索のテキストクエリ。 | |
idGMSPlaceLocationBias > | locationBias |
検索するバイアスのある地域。 | |
idGMSPlaceLocationRestriction > | locationRestriction |
検索する制限された地域。 |
メンバー関数のドキュメント
- (instancetype) initWithTextQuery: | (NSString *) | textQuery | |
placeProperties: | (NSArray< GMSPlaceProperty > *) | placeProperties | |
テキストクエリで GMSPlaceSearchByTextRequest
をインスタンス化し、返すプロパティを配置します。
- パラメータ:
-
textQuery 検索リクエストの文字列クエリ。 placeProperties プレイス結果に含める必要がある GMSPlaceProperty
の配列。空にすることはできませんリストが空の場合、リクエストを送信しようとしたときにエラーが発生します。
プロパティのドキュメント
- (NSString*) includedType [read, write, copy] |
デフォルトの init を使用できない。
指定のイニシャライザを使用してください。リクエストされた場所タイプ。
サポートされている最新のタイプのリストについては、https://developers.google.com/maps/documentation/places/web-service/search-textual#supported-types をご覧ください。
-(int)maxResultCount [read, write, assign] |
返される結果の最大件数です。
1 ~ 20 の値を指定できます。
このフィールドの許容範囲については、https://developers.google.com/maps/documentation/places/web-service/search-textual#maxresultcount をご覧ください。
デフォルトは上限です。
-(浮動小数点数)minRating [read, write, assign] |
結果に含める場所の平均ユーザー評価の最小値。
評価は 0.0 ~ 5.0 の範囲内になります。
指定された評価は 0.5 単位で切り上げられます。GMSPlace
評価プロパティをご覧ください。
デフォルトは 0.0 です。
-(BOOL)isOpenNow [read, write, assign] |
現在営業中のお店やスポットに検索結果を絞り込めます。
デフォルトは true です。
- (NSArray<GMSPlaceProperty>*) placeProperties [read, assign] |
プレイス結果に含める必要がある GMSPlaceProperty
の配列。
- (NSArray<NSNumber *>*) priceLevels [read, write, assign] |
結果に含める場所をフィルタする GMSPlacesPriceLevel
値の配列。
価格レベルの任意の組み合わせを選択できます。デフォルトはすべての価格レベルです
-(GMSPlaceSearchByTextRankPreference)rankPreference [read, write, assign] |
リクエストから返された結果の並べ替えに使用する GMSPlaceSearchByTextRankPreference
。
-(NSString*)regionCode [read, write, copy] |
リクエストの送信元の場所の Unicode 国/地域コード(CLDR)。
地域は、返されるデータの形式やタイプに影響する場合があります。コードが指定されていない場合でも、国や地域に偏りはありません。
地域コードについては、https://unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html をご覧ください。
-(BOOL)isStrictTypeFiltering [read, write, assign] |
includedType
の結果のみを返すかどうかを定義します。
デフォルト値は false です。
- (NSString*) textQuery [read, copy] |
検索のテキストクエリ。
- (id<GMSPlaceLocationBias>) locationBias [read, write, assign] |
検索するバイアスのある地域。
この位置情報はバイアスとして機能し、指定された場所での検索結果が優先されることを意味します。
検索リクエストを実行するときに、locationRestriction または locationBias を設定する必要があります。
locationRestriction とともに設定しても無視されます。
- (id<GMSPlaceLocationRestriction>) locationRestriction [read, write, assign] |
検索する制限された地域。
この地域は制限として機能し、指定された地域外の結果は返されません。
検索リクエストを実行するときに、locationRestriction または locationBias を設定する必要があります。
locationBias では使用できません。
テキスト検索の locationRestriction は、GMSPlaceRectangularLocationOption のみをサポートします。