本页面列出了 types
属性支持的值。
- 表 1 列出了支持地点搜索的类型,且可以与地点详情结果一起返回,并作为自动补全地点预测的一部分返回。
- 表 2 列出了可以通过地点详情结果返回的其他类型,以及作为自动地点预测的一部分返回的其他类型。
- 表 3 列出了可供您在地点自动补全请求中使用的类型。
表 1:地点类型
表 1 中的地点类型值通过以下方式使用:
- 作为地点详情响应的一部分。请求必须指定相应的“类型”数据字段。
- 作为自动补全地点预测的一部分。如需详细了解使用这些值的规则,请参阅地点自动补全。
- 在地点搜索(仅限 Places API)的
type
参数中,用于将结果限制为与指定类型匹配的地点。
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()
)中或返回“地点”结果的任何位置。请求必须指定相应的“类型”数据字段。 - 作为自动补全地点预测的一部分。如需详细了解使用这些值的规则,请参阅地点自动补全。
- 用于表示地址组成部分。
如需详细了解这些类型,请参阅地址类型。
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:地点自动补全请求支持的类型集合
在“地点自动补全”请求中,使用“表 3”或“表 1”和“表 2”中的“地点类型”值,将结果限制为特定类型。
请求中只允许使用表 3 中的一种类型。如果您确实指定了表 3 中的值,则无法指定表 1 或表 2 中的值。
如需详细了解这些值的使用规则,请参阅地点自动补全。
支持的类型为:
geocode
用于指示地点自动补全服务仅返回地理编码结果,而不是返回商家结果。通常,此请求可用于消除指定位置不确定的结果。address
用于指示地点自动补全服务仅返回具有精确地址的地理编码结果。通常,如果您知道用户要查找的是完全指定的地址,则可以使用此请求。establishment
用于指示地点自动补全服务仅返回商家结果。(regions)
类型集合用于指示地点服务返回与以下类型匹配的任何结果:locality
sublocality
postal_code
country
administrative_area_level_1
administrative_area_level_2
(cities)
类型集合用于指示地点服务返回与locality
或administrative_area_level_3
匹配的结果。