Place 类
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
概览
Place 类提供了一个 API,用于使用地点库,还支持 promise 等新型使用模式。借助 Place 类,您可以在应用中创建位置感知功能,并通过根据您的需求自定义的智能搜索功能,向用户提供详细的位置数据。Places 服务中的数据是现实世界中最准确、最新且全面的地点模型之一。
Place 类的用途
Place 类具有以下功能:
搜索地点
获取地点数据
- 地点详情(新)提供有关地点的详细信息,包括文字摘要、营业时间、地址、用户评价、照片等。
- 地点照片可让您访问地点数据库中的高品质照片。
- 地点评价可用于访问地点评价和评分。
后续步骤:开始使用
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eThe Google Maps Places JavaScript library provides tools to search for places using text, proximity, or autocomplete, and retrieve details like photos, reviews, and operating hours.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can leverage the Place class and modern usage patterns, such as Promises, to create location-aware features and access comprehensive place data.\u003c/p\u003e\n"],["\u003cp\u003eThe Places service offers highly accurate, up-to-date, and extensive data representing real-world locations.\u003c/p\u003e\n"],["\u003cp\u003eGet started with the Place class to integrate powerful place search and data retrieval into your JavaScript application.\u003c/p\u003e\n"]]],[],null,["Select platform: [Android](/maps/documentation/places/android-sdk/overview \"View this page for the Android platform docs.\") [iOS](/maps/documentation/places/ios-sdk/overview \"View this page for the iOS platform docs.\") [JavaScript](/maps/documentation/javascript/place \"View this page for the JavaScript platform docs.\") [Web Service](/maps/documentation/places/web-service/overview \"View this page for the Web Service platform docs.\") \n**European Economic Area (EEA) developers** If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](/maps/comms/eea/faq).\n\nOverview\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\nWhat you can do with the Place class\n\nThe Place class has following features:\n\nSearch for places\n\n- [Text Search (New)](/maps/documentation/javascript/place-search) lets you search for place data using a text query.\n- [Nearby Search (New)](/maps/documentation/javascript/nearby-search) lets you search for nearby places by place type.\n- [Place Autocomplete](/maps/documentation/javascript/place-autocomplete-overview) provides your app with the same type-ahead-search behavior of the Google Maps search field.\n\nGet place data\n\n- [Place Details (New)](/maps/documentation/javascript/place-details) provides detailed information about places, including text summary, operating hours, address, user reviews, photos, and more.\n- [Place Photos](/maps/documentation/javascript/place-photos) provides access to high-quality photographic images from the Places database.\n- [Place Reviews](/maps/documentation/javascript/place-reviews) provides access to place reviews and ratings.\n\n**Next step:** [Get started](/maps/documentation/javascript/place-get-started)"]]