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