Maps JavaScript API 中的地点
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
概览
Maps JavaScript API 提供了多种选项,可用于将 Google 的地点数据集成到您的应用中。
地点类
Place 类是地点库中使用的位置的规范 API 表示形式。借助 Place 类,您可以通过智能搜索功能向用户提供详细的位置数据,并且可以根据需要自定义该功能。来自 Places 服务的数据是现实世界中最准确、最新且最全面的地点模型之一。
Places UI Kit
Places UI Kit 是一款易于使用、可自定义且低成本的组件库,可让您为应用引入熟悉且值得信赖的 Google 地图用户体验。Places UI Kit 元素可在 Places 库和 Elevation 库中使用。
地点服务(旧版)
Maps JavaScript API 地点库包含旧版地点服务的方法和数据,这些方法和数据已被 Place 类取代。如需相关指南来帮助您迁移应用以使用 Places 库中的 Place 类,请参阅迁移到 Places(新)。
地点类arrow_drop_down
Place 类提供了一个 API,用于使用地点库,还支持 promise 等新型使用模式。借助 Place 类,您可以在应用中创建位置感知功能,并通过根据您的需求自定义的智能搜索功能,向用户提供详细的位置数据。Places 服务中的数据是现实世界中最准确、最新且全面的地点模型之一。
使用 Maps JavaScript API 功能arrow_drop_down
使用 Maps JavaScript API 服务arrow_drop_down
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eThe Maps JavaScript API lets you integrate Google's Place data into your applications, offering detailed location information through a customizable search feature.\u003c/p\u003e\n"],["\u003cp\u003eYou can utilize the Places UI Kit to easily incorporate pre-built Google Maps user experiences like search and autocomplete into your apps.\u003c/p\u003e\n"],["\u003cp\u003eThe legacy Places service is being replaced by the Place class, offering a more modern approach to location data with support for Promises and detailed location details.\u003c/p\u003e\n"],["\u003cp\u003eAccess a variety of Maps JavaScript API features including markers, location data, custom map styles, and interactive data layers.\u003c/p\u003e\n"],["\u003cp\u003eWork with Maps JavaScript API services such as directions, distance matrix, elevation, geocoding, maximum zoom imagery, and street view.\u003c/p\u003e\n"]]],[],null,["Overview\n\nThe Maps JavaScript API offers a variety of options to integrate Google's Place data into your apps.\n\nPlace class\n\nThe [Place class](/maps/documentation/javascript/place) is the canonical API representation of a location used in the Places Library. With the Place class, you can make detailed location data available to your users through an intelligent search feature that you can customize to suit your needs. Data from the Places service represents one of the most accurate, up-to-date, and comprehensive place models of the real world.\n\nPlaces UI Kit\n\nThe [Places UI Kit](/maps/documentation/javascript/places-ui-kit/overview) is an easy-to-use, customizable, and low-cost component library that lets you bring familiar and trusted Google Maps user experiences to your apps. Places UI Kit elements are available in the [Places Library](/maps/documentation/javascript/places) and the [Elevation Library](/maps/documentation/javascript/elevation).\n\nPlaces Service (Legacy)\n\nThe [Places Library, Maps JavaScript API](/maps/documentation/javascript/places) contains methods and data for the legacy Places service, which have been replaced by the [Place class](/maps/documentation/javascript/place). See [Migrate to Places (New)](/maps/documentation/javascript/places-migration-overview) for guides to help you migrate your apps to use the Place class in the Places Library. \n**Place classarrow_drop_down**\n\nThe Place class provides an API for using the Places library,\nand supports modern usage patterns such as [Promises](/maps/documentation/javascript/promises).\nWith the Place class, you can create location-aware features in your\napp and make detailed location data available to your users through an intelligent search feature\nyou customize to your needs. The data from the Places service is one of the most accurate,\nup-to-date, and comprehensive place models of the real world. \n**Use Maps JavaScript API featuresarrow_drop_down**\n- [Add markers to a map](/maps/documentation/javascript/advanced-markers/overview)\n- [Use the Places library to get location data](/maps/documentation/javascript/place)\n- [Customize the map's style and colors](/maps/documentation/javascript/cloud-customization)\n- [Add interactive data layers](/maps/documentation/javascript/dds-datasets/overview)\n- [Display administrative boundaries](/maps/documentation/javascript/dds-boundaries/overview)\n- [Add a WebGL graphic overlay](/maps/documentation/javascript/webgl/webgl-overlay-view) \n**Work with Maps JavaScript API servicesarrow_drop_down**\n- [Directions Service](/maps/documentation/javascript/directions)\n- [Distance Matrix](/maps/documentation/javascript/distancematrix)\n- [Elevation](/maps/documentation/javascript/elevation)\n- [Geocoding](/maps/documentation/javascript/geocoding)\n- [Maximum Zoom Imagery](/maps/documentation/javascript/maxzoom)\n- [Street View](/maps/documentation/javascript/streetview)"]]