列舉類型說明文件
函式說明文件
- (instancetype) initWithTextQuery: | (NSString *) | textQuery | |
placeProperties: | (NSArray< GMSPlaceProperty > *) | placeProperties | |
使用文字查詢和要傳回的地點屬性,將 GMSPlaceSearchByTextRequest
例項化。
- 參數:
-
textQuery 搜尋要求的字串查詢。 placeProperties Place 結果應包含的 GMSPlaceProperty
陣列。欄位不得留空。如果嘗試傳送空白清單,系統將發生錯誤。
屬性
- (NSString*) includeType [read, write, copy] |
無法使用預設 init。
請使用指定的初始化工具。要求的地點類型。
如需支援類型的最新清單,請參閱 https://developers.google.com/maps/documentation/places/web-service/search-textual#supported-types
- (整數) maxResultCount [read, write, assign] |
要傳回的結果數上限。
允許的值介於 1 到 20 之間。
如要查看這個欄位允許的範圍,請參閱 https://developers.google.com/maps/documentation/places/web-service/search-textual#maxresultcount。
預設值為上限。
- (浮點值) minRating [read, write, assign] |
- (BOOL) 現已開放 [read, write, assign] |
篩選出目前營業中的地點的搜尋結果。
預設為 true。
- (NSArray<GMSPlaceProperty>*) placeProperties [read, assign] |
Place 結果應包含的 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) 是 StrictTypeFiltering [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。