با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
Places SDK به شما امکان می دهد با استفاده از یک رشته متنی یا نزدیکی، اطلاعات انواع مکان ها را جستجو و بازیابی کنید. Places SDK نسخه قدیمی Places SDK (جدید) است.
از این راهنما برای درک تفاوت های کلیدی بین نسخه های Places SDK و مهاجرت به Places SDK (جدید) استفاده کنید.
ویژگی های SDK در هر نسخه موجود است
جدول زیر نشان می دهد که کدام نسخه SDK و API برای هر ویژگی SDK مورد نیاز است:
این بخش ویژگی های کلیدی اضافه شده به Places SDK برای Android (جدید) را پوشش می دهد.
بر روی پلت فرم استاندارد Google Cloud پیاده سازی شده است
Places SDK برای Android (جدید) در زیرساخت خدمات در Google Cloud پیاده سازی شده است. این پیاده سازی یک پلت فرم امن تر و قابل اعتمادتر را به ارمغان می آورد. این طراحی استاندارد سطحی از سازگاری را در بین SDK ها به ارمغان می آورد که کارایی توسعه را با Places SDK برای Android (جدید) بهبود می بخشد.
عملکرد بهبود یافته است
Places SDK برای Android (جدید) عملکرد بهبود یافته ای را ارائه می دهد و جایگزینی برنامه هایی که از SDK موجود استفاده می کنند ارزشمند است.
ویژگی های جدید
Places SDK برای Android (جدید) شامل آخرین نسخههای همه ویژگیهای SDK است:
جستجوی متن (جدید) اطلاعات مجموعهای از مکانها را بر اساس یک رشته برمیگرداند - برای مثال «پیتزا در نیویورک» یا «فروشگاههای کفش در نزدیکی اتاوا» یا «خیابان اصلی ۱۲۳». این سرویس با فهرستی از مکانهای منطبق با رشته متن و هرگونه سوگیری مکان تنظیم شده پاسخ میدهد.
دادههای پاسخ جدید به جزئیات قرار داده شده (جدید) و عکسهای مکان (جدید) اضافه شدند
جزئیات مکان (جدید) اکنون شامل کلاس Review جدید در شیء پاسخ Place . کلاس Place حاوی متد getReviews() جدید برای پشتیبانی از این فیلد است. با getReviews() تماس بگیرید تا حداکثر پنج نظر را برای یک مکان برگردانید.
اکنون می توانید از Place Photo (جدید) برای برگرداندن یک URI به یک بیت مپ تصویر استفاده کنید. قبلاً فقط میتوانستید خود بیت مپ تصویر را برگردانید.
قیمت گذاری ساده شده
قیمت گذاری با Places SDK برای Android (جدید) ساده شده است، به طوری که شما فقط برای داده هایی که استفاده می کنید پرداخت می کنید. قیمت گذاری ساده شده با استفاده از لیست های فیلد، که به آن ماسک های میدان نیز می گویند، اجرا می شود.
با جزئیات مکان و جستجوی متن، از لیست فیلدها برای کنترل لیست فیلدهایی که باید در پاسخ بازگردانده شوند، استفاده می کنید. سپس فقط برای داده های درخواستی صورتحساب دریافت می کنید. استفاده از فهرست فیلد یک روش طراحی خوب برای اطمینان از عدم درخواست دادههای غیرضروری است که به جلوگیری از زمان پردازش غیر ضروری و هزینههای صورتحساب کمک میکند.
SDK جدید شامل انواع مکان های جدید است که به عنوان بخشی از پاسخ جزئیات مکان و جستجوی متن برگردانده می شوند. همچنین می توانید از این انواع جدید و انواع موجود در جستجو با جستجوی متن استفاده کنید. انواع جدید در جدول A آمده است.
تاریخ آخرین بهروزرسانی 2025-09-03 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-09-03 بهوقت ساعت هماهنگ جهانی."],[],[],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| Feature | Places API enabled on API key | Initialization method | Minimum SDK version |\n|---------------------------------------------------------------------------------|-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|\n| [Autocomplete (New)](/maps/documentation/places/android-sdk/place-autocomplete) | Places API (New) | [`initializeWithNewPlacesApiEnabled()`](/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/Places#initializeWithNewPlacesApiEnabled(android.content.Context,%20java.lang.String)) | 3.5.0 |\n| [Place Details (New)](/maps/documentation/places/android-sdk/details-place) | Places API (New) | [`initializeWithNewPlacesApiEnabled()`](/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/Places#initializeWithNewPlacesApiEnabled(android.content.Context,%20java.lang.String)) | 3.3.0 |\n| [Nearby Search (New)](/maps/documentation/places/android-sdk/nearby-search) | Places API (New) | [`initializeWithNewPlacesApiEnabled()`](/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/Places#initializeWithNewPlacesApiEnabled(android.content.Context,%20java.lang.String)) | 3.5.0 |\n| [Place Photos (New)](/maps/documentation/places/android-sdk/place-photos) | Places API (New) | [`initializeWithNewPlacesApiEnabled()`](/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/Places#initializeWithNewPlacesApiEnabled(android.content.Context,%20java.lang.String)) | 3.4.0 |\n| [Text Search (New)](/maps/documentation/places/android-sdk/text-search) | Places API (New) | [`initializeWithNewPlacesApiEnabled()`](/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/Places#initializeWithNewPlacesApiEnabled(android.content.Context,%20java.lang.String)) | 3.3.0 |\n| [Place Autocomplete](/maps/documentation/places/android-sdk/autocomplete) | Places API | [`initialize()`](/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/Places#initialize(android.content.Context,%20java.lang.String)) | |\n| [Current Place](/maps/documentation/places/android-sdk/current-place) | Places API | [`initialize()`](/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/Places#initialize(android.content.Context,%20java.lang.String)) | |\n| [Place Details](/maps/documentation/places/android-sdk/place-details) | Places API | [`initialize()`](/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/Places#initialize(android.content.Context,%20java.lang.String)) | |\n| [Place Photos](/maps/documentation/places/android-sdk/photos) | Places API | [`initialize()`](/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/Places#initialize(android.content.Context,%20java.lang.String)) | |\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/android-sdk/migrate-details)\n- [Migrate to Place Photo (New)](/maps/documentation/places/android-sdk/migrate-photo)\n- [Migrate to Autocomplete (New)](/maps/documentation/places/android-sdk/migrate-autocomplete)\n\nEnhancements in Places SDK for Android (New)\n\nThis section covers key features added to Places SDK for Android (New).\n\nImplemented on the Google Cloud standard platform\n\nPlaces SDK for Android (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 Android\n(New).\n\nImproved performance\n\nPlaces SDK for Android (New) provides improved performance, making it\nworthwhile to replace apps that use the existing SDK.\n\nNew features\n\nThe Places SDK for Android (New) includes the latest versions of all of the SDK\nfeatures:\n\n- [Autocomplete (New)](/maps/documentation/places/android-sdk/place-autocomplete)\n- [Place Details (New)](/maps/documentation/places/android-sdk/details-place)\n- [Nearby Search (New)](/maps/documentation/places/android-sdk/nearby-search)\n- [Place Photos (New)](/maps/documentation/places/android-sdk/place-photos)\n- [Text Search (New)](/maps/documentation/places/android-sdk/text-search)\n\nNew Text Search service\n\n[Text Search](/maps/documentation/places/android-sdk/legacy/text-search) (New) returns information\nabout a set of places based on a string --- for example \"pizza in New York\" or\n\"shoe stores near Ottawa\" or \"123 Main Street\". The service responds with a list\nof places matching the text string and any location bias that has been set.\n\nNew response data added to Placed Details (New) and Place Photos (New)\n\n- [Place Details](/maps/documentation/places/android-sdk/details-place)\n (New) now includes the new\n [Review](/maps/documentation/places/android-sdk/legacy/reference/com/google/android/libraries/places/api/model/Review)\n class in the response `Place` object. The\n [Place](/maps/documentation/places/android-sdk/legacy/reference/com/google/android/libraries/places/api/model/Place) class\n contains the new `getReviews()` method to support this field. Call\n `getReviews()` to return up to five reviews for a place.\n\n- [Place Photo](/maps/documentation/places/android-sdk/place-photos)\n (New) adds the\n [`AuthorAttributions`](/maps/documentation/places/android-sdk/legacy/reference/com/google/android/libraries/places/api/model/AuthorAttributions)\n to the `PhotoMetadata` class. `AuthorAttributions` contains a `List` of\n [`AuthorAttribution`](/maps/documentation/places/android-sdk/legacy/reference/com/google/android/libraries/places/api/model/AuthorAttribution)\n objects.\n\nNew URI response added to Place Photos (New)\n\nYou can now use\n[Place Photo](/maps/documentation/places/android-sdk/place-photos)\n(New) to return a URI to an image bitmap. Previously, you could only return the\nimage bitmap itself.\n\nSimplified pricing\n\nPricing is simplified with Places SDK for Android (New) so that you only\npay for the data you use. Simplified pricing is implemented using field lists,\nalso called *field masks*.\n\nWith Place Details 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 to ensure 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/android-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/android-sdk/place-types#table-a)."]]