此产品或功能处于旧版状态。如需详细了解“旧版”状态,请参阅
旧版产品和功能。如需迁移到 Places API for iOS(新版),请参阅
迁移指南。
Places SDK(旧版)概览
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
借助 Places SDK,您可以使用文本字符串或按邻近程度搜索和检索各种地点类型的信息。Places SDK 是 Places SDK(新)的旧版。
请使用本指南了解 Places SDK 各版本之间的主要区别,并迁移到 Places SDK(新)。
各版本中提供的 SDK 功能
下表显示了每项 SDK 功能所需的 SDK 和 API 版本:
迁移到新 API
如需迁移到新 API,请参阅以下迁移指南:
Places SDK for iOS 中的增强功能(新)
本部分介绍了添加到 Places SDK for iOS(新版)的关键功能。
Places SDK for iOS(新版)是在 Google Cloud 上的服务基础架构上实现的。此实现可打造更安全、更值得信赖的平台。这种标准设计可提高 Places SDK for iOS(新版)的开发效率,使各个 SDK 保持一定程度的一致性。
Places SDK for iOS(新版)可提供更出色的性能,因此值得替换使用现有 SDK 的应用。
新功能
Places SDK for iOS(新)包含所有 SDK 功能的最新版本:
简化的价格方案
Places SDK for iOS(新版)简化了定价,因此您只需为自己使用的数据付费。简化的价格方案是使用字段列表(也称为字段掩码)实现的。
借助 Places SDK for iOS 和文本搜索,您可以使用字段列表来控制要在响应中返回的字段列表。然后,您只需为所请求的数据付费。使用字段列表是一种有效的设计做法,可确保您不会请求不必要的数据,这有助于避免产生不必要的处理时间和结算费用。
如需详细了解这两个 SDK 的价格信息,请参阅用量和结算。
扩展的地点类型
新版 SDK 包含新的地点类型,这些类型会作为地点详情和文本搜索响应的一部分返回。您还可以在使用文本搜索的搜索中,使用这些新类型以及现有类型。新类型已包含在表 A 中。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[],[],null,["The Places SDK lets you search for and retrieve information for a variety of\nplace types using a text string or by proximity. Places SDK is the legacy\nversion of Places SDK (New).\n\nUse this guide to understand the key differences between the Places SDK versions\nand migrate to Places SDK (New).\n\nSDK features available in each version\n\nThe following table shows which SDK and API versions are required for each SDK\nfeature:\n\n| Places SDK for iOS (New) | Minimum SDK Version | Places SDK for iOS | Minimum SDK Version |\n|-----------------------------------------------------------------------------|---------------------|-------------------------------------------------------------------|---------------------|\n| [Place Details (New)](/maps/documentation/places/ios-sdk/details-place) | 9.0.0 | [Place Details](/maps/documentation/places/ios-sdk/place-details) | 3.0.0 |\n| [Place Photo (New)](/maps/documentation/places/ios-sdk/place-photos) | 9.0.0 | [Place Photo](/maps/documentation/places/ios-sdk/photos) | 3.0.0 |\n| [Text Search (New)](/maps/documentation/places/ios-sdk/text-search) | 8.5.0 | | |\n| [Nearby Search (New)](/maps/documentation/places/ios-sdk/nearby-search) | 9.0.0 | | |\n| [Autocomplete (New)](/maps/documentation/places/ios-sdk/place-autocomplete) | 9.0.0 | [Autocomplete](/maps/documentation/places/ios-sdk/autocomplete) | 3.0.0 |\n| | | [Current Place](/maps/documentation/places/ios-sdk/current-place) | 3.0.0 |\n\nMigrate to the new APIs\n\nTo migrate to the new APIs, see the following migration guides:\n\n- [Migrate to Place Details (New)](/maps/documentation/places/ios-sdk/migrate-details)\n- [Migrate to Place Photo (New)](/maps/documentation/places/ios-sdk/migrate-photo)\n- [Migrate to Autocomplete (New)](/maps/documentation/places/ios-sdk/migrate-autocomplete)\n\nEnhancements in Places SDK for iOS (New)\n\nThis section covers key features added to Places SDK for iOS\n(New).\n\nImplemented on the Google Cloud standard platform\n\nPlaces SDK for iOS (New) is implemented on the [service\ninfrastructure](https://cloud.google.com/service-infrastructure/docs/overview)\non Google Cloud. This implementation brings a more secure and trusted platform.\nThis standard design brings a level of consistency across the SDKs that improve\nthe efficiency of development with Places SDK for iOS\n(New).\n\nImproved performance\n\nPlaces SDK for iOS (New) provides improved performance, making\nit worthwhile to replace apps that use the existing SDK.\n\nNew features\n\nThe Places SDK for iOS (New) includes the latest versions of\nall of the SDK features:\n\n- [Autocomplete (New)](/maps/documentation/places/ios-sdk/place-autocomplete)\n- [Place Details (New)](/maps/documentation/places/ios-sdk/details-place)\n- [Nearby Search (New)](/maps/documentation/places/ios-sdk/nearby-search)\n- [Place Photos (New)](/maps/documentation/places/ios-sdk/place-photos)\n- [Text Search (New)](/maps/documentation/places/ios-sdk/text-search)\n\nSimplified pricing\n\nPricing is simplified with Places SDK for iOS (New) so that\nyou only pay for the data you use. Simplified pricing is implemented using field\nlists, also called *field masks*.\n\nWith Places SDK for iOS and\nText Search you use field lists to control the list of\nfields to return in the response. You are then only billed for the data\nrequested. Using a field list is a good design practice so that you don't\nrequest unnecessary data, which helps to avoid unnecessary processing time and\nbilling charges.\n\nFor detailed pricing information for both SDKs, see [Usage and\nBilling](/maps/documentation/places/ios-sdk/usage-and-billing).\n\nExpanded place types\n\nThe new SDK includes new place types, which are returned as part of the\nPlace Details and Text Search\nresponse. You can also use these new types, and the existing types, in a search\nwith Text Search. The new types are included in [Table\nA](/maps/documentation/places/ios-sdk/place-types#table-a)."]]