本頁面列出 types
屬性支援的值。
- 表 1 列出了地點搜尋支援的類型,且可透過地點詳細資料結果傳回,以及做為自動完成地點預測的一部分。
- 表 2 列出了可在地點詳細資料結果中傳回的其他類型,以及做為自動完成地點預測的一部分。
- 表 3 列出可用於自動完成自動完成要求的類型。
表 1:地點類型
下表 1 中的地點類型值的使用方式如下:
- 地點詳細資料回應的一部分。要求必須指定適當的「類型」資料欄位。
- 作為自動完成地點預測的一部分。如要進一步瞭解使用這些值的規則,請參閱 Places Autocomplete。
- 在地點搜尋的
type
參數 (僅限 Places API) 中,將結果限制為符合指定類型的地點。
accounting
airport
amusement_park
aquarium
art_gallery
atm
bakery
bank
bar
beauty_salon
bicycle_store
book_store
bowling_alley
bus_station
cafe
campground
car_dealer
car_rental
car_repair
car_wash
casino
cemetery
church
city_hall
clothing_store
convenience_store
courthouse
dentist
department_store
doctor
drugstore
electrician
electronics_store
embassy
fire_station
florist
funeral_home
furniture_store
gas_station
gym
hair_care
hardware_store
hindu_temple
home_goods_store
hospital
insurance_agency
jewelry_store
laundry
lawyer
library
light_rail_station
liquor_store
local_government_office
locksmith
lodging
meal_delivery
meal_takeaway
mosque
movie_rental
movie_theater
moving_company
museum
night_club
painter
park
parking
pet_store
pharmacy
physiotherapist
plumber
police
post_office
primary_school
real_estate_agency
restaurant
roofing_contractor
rv_park
school
secondary_school
shoe_store
shopping_mall
spa
stadium
storage
store
subway_station
supermarket
synagogue
taxi_stand
tourist_attraction
train_station
transit_station
travel_agency
university
veterinary_care
zoo
表 2:Places 服務傳回的其他類型
下表 2 中的地點類型值的使用方式如下:
- 地點詳細資料要求的結果 (例如呼叫
fetchPlace()
) 或傳回「地點」結果的任何位置。要求必須指定適當的「類型」資料欄位。 - 作為自動完成地點預測的一部分。如要進一步瞭解使用這些值的規則,請參閱 Places Autocomplete。
- 用於表示地址元件。
如要進一步瞭解這些類型,請參閱地址類型。
administrative_area_level_1
administrative_area_level_2
administrative_area_level_3
administrative_area_level_4
administrative_area_level_5
administrative_area_level_6
administrative_area_level_7
archipelago
colloquial_area
continent
country
establishment
finance
floor
food
general_contractor
geocode
health
intersection
landmark
locality
natural_feature
neighborhood
place_of_worship
plus_code
point_of_interest
political
post_box
postal_code
postal_code_prefix
postal_code_suffix
postal_town
premise
room
route
street_address
street_number
sublocality
sublocality_level_1
sublocality_level_2
sublocality_level_3
sublocality_level_4
sublocality_level_5
subpremise
town_square
表 3:Place Autocomplete 要求支援的類型集合
使用 Place 表中的 Place 類型值,或表 1 和表 2 中的值,做為 Place Autocomplete 要求的一部分,將結果限制為特定類型。
要求中只允許使用表 3 的一種類型。如果您指定了資料表 3 中的值,就無法指定資料表 1 或資料表 2 的值。
如要進一步瞭解使用這些值的規則,請參閱 Places Autocomplete。
支援的類型如下:
geocode
會指示 Place Autocomplete 服務只傳回地理編碼結果,而不會傳回商家結果。您通常會使用這項要求來釐清結果,因為其中的位置可能並不正確。address
會指示 Place Autocomplete 服務只傳回精確地址的地理編碼結果。一般來說,如果您知道使用者會尋找完整指定的地址,就可以使用這項要求。establishment
會指示 Place Autocomplete 服務只傳回業務結果。(regions)
類型集合會指示 Places 服務傳回所有與下列類型相符的結果:locality
sublocality
postal_code
country
administrative_area_level_1
administrative_area_level_2
(cities)
類型集合會指示 Places 服務傳回符合locality
或administrative_area_level_3
的結果。