本頁面列出 types 屬性支援的值。
- 表 1 列出 Place Search 支援的類型,這些類型可與 Place Details 結果一併傳回,並做為 Place Autocomplete 預測結果的一部分。
- 表 2 列出可與 Place Details 結果一併傳回的其他類型,這些類型可做為 Place Autocomplete 預測結果的一部分。
- 表 3 列出可在 Place Autocomplete 要求中使用的類型。
表 1:地點類型
表 1 中地點類型值的使用方式如下:
- 做為 Place Details 回應的一部分。要求必須指定適當的「類型」資料欄位。
- 做為 Place Autocomplete (舊版) 地點預測結果的一部分。如要進一步瞭解這些值的使用規則,請參閱 Place Autocomplete (舊版)。
- 在 Place Search (僅限 Places API) 的
type參數中,將結果範圍限制在符合指定類型的地點。
accountingairportamusement_parkaquariumart_galleryatmbakerybankbarbeauty_salonbicycle_storebook_storebowling_alleybus_stationcafecampgroundcar_dealercar_rentalcar_repaircar_washcasinocemeterychurchcity_hallclothing_storeconvenience_storecourthousedentistdepartment_storedoctordrugstoreelectricianelectronics_storeembassyfire_stationfloristfuneral_homefurniture_storegas_stationgymhair_carehardware_storehindu_templehome_goods_storehospitalinsurance_agencyjewelry_storelaundry
lawyerlibrarylight_rail_stationliquor_storelocal_government_officelocksmithlodgingmeal_deliverymeal_takeawaymosquemovie_rentalmovie_theatermoving_companymuseumnight_clubpainterparkparkingpet_storepharmacyphysiotherapistplumberpolicepost_officeprimary_schoolreal_estate_agencyrestaurantroofing_contractorrv_parkschoolsecondary_schoolshoe_storeshopping_mallspastadiumstoragestoresubway_stationsupermarketsynagoguetaxi_standtourist_attractiontrain_stationtransit_stationtravel_agencyuniversityveterinary_carezoo
表 2:地點介面集服務傳回的其他類型
表 2 中地點類型值的使用方式如下:
- 屬於 Place Details 要求 (例如呼叫
fetchPlace()) 結果的一部分,或位於傳回「地點」結果的任何位置。要求必須指定適當的「類型」資料欄位。 - 做為 Place Autocomplete (舊版) 地點預測結果的一部分。如要進一步瞭解這些值的使用規則,請參閱 Place Autocomplete (舊版)。
- 用於表示地址元件。
如要進一步瞭解這些類型,請參閱「地址類型」一文。
administrative_area_level_1administrative_area_level_2administrative_area_level_3administrative_area_level_4administrative_area_level_5administrative_area_level_6administrative_area_level_7archipelagocolloquial_areacontinentcountryestablishmentfinancefloorfoodgeneral_contractorgeocodehealthintersectionlandmarklocalitynatural_featureneighborhoodplace_of_worship
plus_codepoint_of_interestpoliticalpost_boxpostal_codepostal_code_prefixpostal_code_suffixpostal_townpremiseroomroutestreet_addressstreet_numbersublocalitysublocality_level_1sublocality_level_2sublocality_level_3sublocality_level_4sublocality_level_5subpremisetown_square
表 3:Place Autocomplete (舊版) 要求支援的類型集合
發出 Place Autocomplete (舊版) 要求時,可使用表 3 中的地點類型值,或表 1 和表 2 中的值,以便取得特定類型的結果。
在要求中只能使用表 3 中的一種類型。如果指定表 3 中的值,就無法指定表 1 或表 2 中的值。
如要進一步瞭解這些值的使用規則,請參閱 Place Autocomplete (舊版)。
支援的類型如下:
geocode會指示 Place Autocomplete (舊版) 服務只傳回地理編碼結果,而不是傳回商家結果。一般而言,這項要求可用來釐清指定位置可能不明確的結果。address會指示 Place Autocomplete (舊版) 服務只傳回包含精確地址的地理編碼結果。一般而言,如果您知道使用者要查詢的是完整確切的地址,就可以使用這項要求。establishment會指示 Place Autocomplete (舊版) 服務只傳回商家結果。(regions)類型集合會指示地點介面集服務,傳回與下列類型相符的任何結果:localitysublocalitypostal_codecountryadministrative_area_level_1administrative_area_level_2
(cities)類型集合會指示地點介面集服務,傳回與locality或administrative_area_level_3相符的結果。