地点类型是用于标识地点特征的类别。地点可以被分配一个或多个地点类型。
地点的类型包含在“地点详情(新)”“附近搜索(新)”“文本搜索(新)”和“地点自动补全(新)”请求的响应中:
- 地点可以具有与其关联的表 A 类型或表 B 类型的单一主要类型。
例如,主要类型可能是
mexican_restaurant
或steak_house
。 - 地点可以具有与其关联的表格 A类型或表格 B类型的多个类型值。
例如,餐厅可能具有以下类型:
seafood_restaurant
、restaurant
、food
、point_of_interest
、establishment
。 - 地点的地址和地址组成部分可以使用地址类型和地址组成部分类型表中的某些类型进行标记。例如,地址可能会被标记为
street_address
,地址的组成部分可能会被标记为street_number
。
您还可以在请求中指定地点类型。在请求中指定此类型后,该类型会用作过滤条件,将响应限制为仅包含与指定类型匹配的地点。
类型表简介
表 A 列出了各种地点类型支持的值:
- 作为“地点详情(新)”“附近搜索(新)”和“文本搜索(新)”响应的一部分返回。然后,系统将使用表 A 中的值来填充这些字段。
- 在“附近搜索(新)”请求中用作
includedTypes
、excludedTypes
、includedPrimaryTypes
和excludedPrimaryTypes
参数的值。然后,系统将使用表 B 中的值来填充这些字段。 - 在“文本搜索(新)”请求中用作
includedType
参数的值。 - 在“地点自动补全微件(新)”请求中用作
includedPrimaryTypes
参数的值。 - 作为“地点自动补全微件(新)”响应的一部分返回。
表 B 列出了也可以在“地点详情(新)”“附近搜索(新)”“文本搜索(新)”和“地点自动补全 widget(新)”响应中返回的其他地点类型值。请求必须在字段掩码中指定 places.types
或 places.primaryType
字段中的至少一个。除了在“地点自动补全 widget(新)”请求中作为 includedPrimaryTypes
参数的值以外,表 B 中的值不能在请求中使用。
地址类型和地址组成部分类型列出了响应正文中的地址类型数组和/或地址组成部分类型数组中可能出现的类型。地址组成部分类型可能会发生变化。
表 A
汽车 | ||
---|---|---|
car_dealer car_rental car_repair car_wash |
electric_vehicle_charging_station gas_station parking rest_stop |
|
企业 | ||
corporate_office *farm ranch * |
||
文化 | ||
art_gallery art_studio *auditorium *cultural_landmark *historical_place * |
monument *museum performing_arts_theater sculpture * |
|
教育 | ||
library preschool primary_school
|
school secondary_school university
|
|
休闲娱乐场所 | ||
adventure_sports_center *amphitheatre *amusement_center amusement_park aquarium banquet_hall barbecue_area *botanical_garden *bowling_alley casino childrens_camp *comedy_club *community_center concert_hall *convention_center cultural_center cycling_park *dance_hall *dog_park event_venue |
ferris_wheel *garden *hiking_area *historical_landmark internet_cafe *karaoke *marina movie_rental movie_theater national_park night_club observation_deck *off_roading_area *opera_house *park philharmonic_hall *picnic_ground *planetarium *plaza *roller_coaster * |
skateboard_park *state_park *tourist_attraction video_arcade *visitor_center water_park *wedding_venue wildlife_park *wildlife_refuge *zoo
|
设施 | ||
public_bath *public_bathroom *stable *
|
||
金融 | ||
accounting atm bank
|
||
餐饮 | ||
acai_shop *afghani_restaurant *african_restaurant *american_restaurant asian_restaurant *bagel_shop *bakery bar bar_and_grill *barbecue_restaurant brazilian_restaurant breakfast_restaurant brunch_restaurant buffet_restaurant *cafe cafeteria *candy_store *cat_cafe *chinese_restaurant chocolate_factory *chocolate_shop *coffee_shop confectionery * |
deli *dessert_restaurant *dessert_shop *diner *dog_cafe *donut_shop *fast_food_restaurant fine_dining_restaurant *food_court *french_restaurant greek_restaurant hamburger_restaurant ice_cream_shop indian_restaurant indonesian_restaurant italian_restaurant japanese_restaurant juice_shop *korean_restaurant *lebanese_restaurant meal_delivery meal_takeaway mediterranean_restaurant |
mexican_restaurant middle_eastern_restaurant pizza_restaurant pub *ramen_restaurant restaurant sandwich_shop seafood_restaurant spanish_restaurant steak_house sushi_restaurant tea_house *thai_restaurant turkish_restaurant vegan_restaurant vegetarian_restaurant vietnamese_restaurant wine_bar *
|
地理区域 | ||
administrative_area_level_1 administrative_area_level_2 country
|
locality postal_code school_district
|
|
政府 | ||
city_hall courthouse embassy fire_station government_office *
|
local_government_office neighborhood_police_station (仅限日本)police post_office
|
|
健康与保健 | ||
chiropractor *dental_clinic dentist doctor drugstore hospital massage *medical_lab *
|
pharmacy physiotherapist sauna *skin_care_clinic *spa tanning_studio *wellness_center *yoga_studio *
|
|
住房 | ||
apartment_building *apartment_complex *condominium_complex *housing_complex *
|
||
住宿 | ||
bed_and_breakfast budget_japanese_inn *campground camping_cabin cottage extended_stay_hotel farmstay guest_house
hostel *hotel * |
inn *japanese_inn *lodging mobile_home_park *motel private_guest_room resort_hotel rv_park
|
|
自然景观 | ||
beach *
|
||
礼拜场所 | ||
church hindu_temple mosque synagogue
|
||
服务 | ||
astrologer *barber_shop beautician *beauty_salon body_art_service *catering_service *cemetery child_care_agency consultant courier_service electrician florist food_delivery *foot_care *funeral_home hair_care hair_salon insurance_agency laundry * |
lawyer locksmith makeup_artist *moving_company nail_salon *painter plumber psychic *real_estate_agency roofing_contractor storage summer_camp_organizer *tailor telecommunications_service_provider tour_agency *tourist_information_center *travel_agency veterinary_care
|
|
购物 | ||
asian_grocery_store *auto_parts_store bicycle_store book_store butcher_shop *cell_phone_store clothing_store convenience_store department_store discount_store electronics_store food_store *furniture_store gift_shop grocery_store hardware_store home_goods_store
|
home_improvement_store jewelry_store liquor_store market pet_store shoe_store shopping_mall sporting_goods_store store supermarket warehouse_store *wholesaler
|
|
体育 | ||
arena *athletic_field fishing_charter *fishing_pond *fitness_center golf_course gym ice_skating_rink * |
playground *ski_resort sports_activity_location *sports_club sports_coaching *sports_complex stadium swimming_pool
|
|
交通 | ||
airport airstrip *bus_station bus_stop ferry_terminal heliport international_airport *light_rail_station |
park_and_ride *subway_station taxi_stand train_station transit_depot transit_station truck_stop
|
表 B
其他地点类型值 | ||
---|---|---|
administrative_area_level_3 administrative_area_level_4 administrative_area_level_5 administrative_area_level_6 administrative_area_level_7 archipelago colloquial_area continent establishment finance food general_contractor geocode health intersection landmark natural_feature neighborhood place_of_worship plus_code
|
point_of_interest political postal_code_prefix postal_code_suffix postal_town premise route street_address sublocality sublocality_level_1 sublocality_level_2 sublocality_level_3 sublocality_level_4 sublocality_level_5 subpremise town_square
|
地址类型和地址组成部分类型
响应中的 types
数组表示地址类型。地址类型的示例包括街道地址、国家/地区或政治实体。google.maps.places.AddressComponent
类中的 types
数组表示地址的每个部分的类型。示例包括门牌号码或国家/地区。
地址可能具有多种类型。这些类型可能会被视为“标记”。
例如,许多城市都带有 political
和 locality
类型的标记。
对于地址类型和地址组成部分类型数组,系统都支持并返回以下类型:
地址类型 | 说明 |
---|---|
street_address |
精确的街道地址。 |
route |
已命名的路线(例如“US 101”)。 |
intersection |
主要交叉路口,通常是两条主要道路的交叉路口。 |
political |
政治实体。通常,这种类型表示某个民政管理部门的多边形 |
country |
表示国家政治实体,通常列在地理编码器所返回结果的最前面。 |
administrative_area_level_1 |
表示国家/地区级别以下的一级行政实体。在美国,这类行政级别是指州。并不是所有国家都设有这类行政级别。在大多数情况下,administrative_area_level_1 简称可高度匹配 ISO 3166-2 行政区划以及其他广为传播的列表;不过,我们无法对此做出保证,因为我们的地理编码结果基于各种信号和位置数据。 |
administrative_area_level_2 |
表示国家/地区级别以下的二级行政实体。在美国,这类行政级别是指县。并不是所有国家都设有这类行政级别。 |
administrative_area_level_3 |
表示国家/地区级别以下的三级行政实体。此类型表示较小的行政区划单位。并不是所有国家都设有这类行政级别。 |
administrative_area_level_4 |
表示国家/地区级别以下的四级行政实体。此类型表示较小的行政区划单位。并不是所有国家都设有这类行政级别。 |
administrative_area_level_5 |
表示国家/地区级别以下的五级行政实体。此类型表示较小的行政区划单位。并不是所有国家都设有这类行政级别。 |
administrative_area_level_6 |
表示国家/地区级别以下的六级行政实体。此类型表示较小的行政区划单位。并不是所有国家都设有这类行政级别。 |
administrative_area_level_7 |
表示国家/地区级别以下的七级行政实体。此类型表示较小的行政区划单位。并不是所有国家都设有这类行政级别。 |
colloquial_area |
实体的常用替代名称。 |
locality |
表示有建制的城市或城镇政治实体。 |
sublocality |
表示市行政区以下的一级行政实体。对于某些位置,可能会收到以下任一类型:sublocality_level_1 到 sublocality_level_5 。每个子级市行政区级别都是一个行政实体。数字越大,表示的地理区域越小 |
neighborhood |
表示已命名的街区。 |
premise |
已命名的位置,通常是具有常见名称的建筑物或建筑群。 |
subpremise |
相应楼宇级别以下的可寻址实体,例如公寓、单元或套房。 |
plus_code |
经过编码的位置引用,衍生自纬度和经度。Plus Code 可用于在没有街道地址的地点(例如建筑物未编号,或者街道未命名)取代街道地址。如需了解详情,请参阅 https://plus.codes。 |
postal_code |
表示国家/地区内邮寄地址所用的邮政编码。 |
natural_feature |
某个明显的自然地貌。 |
airport |
机场。 |
park |
已命名的公园。 |
point_of_interest |
已命名的地图注点。通常情况下,这些“地图注点”是当地的著名实体,无法轻易归入其他类别,例如“帝国大厦”或“埃菲尔铁塔”。 |
空的类型列表表示特定地址组成部分没有对应的已知类型,例如法国的地点 (Lieu-dit)。
除了上述类型之外,地址组成部分还可能包括下列类型。
地址组成部分类型 | 说明 |
---|---|
floor |
某个建筑物地址的楼层。 |
establishment |
通常表示某个尚未归类的地点。 |
landmark |
附近的地点,可用作辅助导航的参考。 |
point_of_interest |
已命名的地图注点。 |
parking |
停车场或停车楼。 |
post_box |
特定的邮箱。 |
postal_town |
地理区域分组(例如 locality 和 sublocality ),在某些国家/地区用于邮寄地址。 |
room |
某个建筑物地址的房间。 |
street_number |
精确的门牌号。 |
bus_station 、train_station 和 transit_station |
公交车站、火车站或公共交通工具站点的位置。 |