تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
المطوّرون في المنطقة الاقتصادية الأوروبية
تتيح حزمة تطوير برامج الأماكن لأجهزة Android استخدام تفاصيل المكان (الإصدار القديم).
إذا كنت على دراية بحزمة تطوير البرامج (SDK) للأماكن لنظام التشغيل Android (الإصدار القديم)، سيتم إجراء التغييرات التالية على تفاصيل المكان (الإصدار الجديد):
يجب إخفاء الحقل. يجب تحديد الحقول التي تريد عرضها في الرد. لا توجد قائمة تلقائية بالحقول التي يتم عرضها. إذا حذفت هذه القائمة، ستعرض الطرق رسالة خطأ.
توضّح الأقسام التالية تغييرات إضافية.
الوصول إلى أنواع أماكن جديدة
يمكن أن يتضمّن كل مكان قيمة نوع واحدة أو أكثر مرتبطة به. يضيف الإصدار 3.3.0 والإصدارات الأحدث من Places SDK for Android العديد من قيم الأنواع الجديدة. للاطّلاع على القائمة الكاملة، راجِع أنواع الأماكن الموسّعة.
تعرض الطريقة
Place.getPlaceTypes()
قيم النوع كقائمة من قيم السلسلة. تعتمد القيم المعروضة
على إصدار "حزمة تطوير برامج الأماكن لأجهزة Android" الذي تستخدمه:
حزمة تطوير البرامج (SDK) للأماكن لنظام التشغيل Android (جديدة): تعرض السلاسل المحدّدة في الجدول "أ" والجدول "ب" الواردَين في أنواع الأماكن (جديدة)، بما في ذلك جميع أنواع الأماكن المضافة في الإصدار 3.3.0.
حزمة تطوير البرامج للأماكن في Android: تعرض القيم التعدادية المحدّدة بواسطة
Place.Types، والتي لا تتضمّن الأنواع الجديدة التي تمت إضافتها في الإصدار 3.3.0
والإصدارات الأحدث.
الوصول إلى مراجعات الأماكن
تضيف حزمة تطوير البرامج (SDK) الجديدة الخاصة بخدمة Places API لنظام التشغيل Android الفئة
Review،
التي تحتوي على مراجعة لمكان. يمكن أن يحتوي العنصر Place على ما يصل إلى خمس مراجعات.
يمكن أن يحتوي الصف Review أيضًا على معلومات تحديد المصدر ومعلومات تحديد مؤلف. إذا عرضت المراجعة في تطبيقك، عليك أيضًا عرض أي معلومات تحديد المصدر أو معلومات تحديد المؤلف. لمزيد من المعلومات، يُرجى الاطّلاع على عرض مراجعة.
لمزيد من المعلومات، يُرجى الاطّلاع على المستندات المتعلقة بالمراجع.
رمز لغة اسم مكان الوصول
في حزمة تطوير البرامج Places SDK for Android (الإصدار القديم)، يعرض
Place.getName()
طريقة سلسلة نصية تحتوي على اسم مكان. لتعبئة الكائن
Place باسم المكان، يجب تضمين
Place.Field.DISPLAY_NAME في قائمة الحقول الخاصة بطلب تفاصيل المكان.
يحتوي العنصر Place الآن على رمز اللغة لسلسلة الاسم. لإضافة رمز اللغة إلى الكائن Place، عليك اتّباع الخطوات التالية:
أدرِج Place.Field.DISPLAY_NAME في قائمة الحقول الخاصة بالطلب.
تضبط هذه القيمة الردّ لتضمين كل من اسم المكان ورمز اللغة في الكائن Place.
اتّصِل على
PlacesClient.fetchPlace().
لا يتيح PlacesClient.findCurrentPlace() استخدام حقل رمز اللغة.
تضيف حزمة تطوير البرامج (SDK) الجديدة الخاصة بـ "الأماكن في Android" مَعلمة طلب رمز المنطقة إلى "تفاصيل المكان". يتم استخدام رمز المنطقة لتنسيق الاستجابة، ويتم تحديده كقيمة رمز CLDR مكوّن من حرفَين. يمكن أن يكون لهذه المَعلمة أيضًا تأثير متحيز على نتائج البحث. لا توجد قيمة تلقائية. يجب تفعيل حزمة SDK الجديدة لضبط رمز المنطقة.
إذا كان اسم البلد في حقل العنوان في الردّ يتطابق مع رمز المنطقة، سيتم حذف رمز البلد من العنوان.
تتطابق معظم رموز CLDR مع رموز ISO 3166-1، مع بعض الاستثناءات البارزة.
على سبيل المثال، نطاق المستوى الأعلى لرمز البلد في المملكة المتحدة هو "uk" (.co.uk)، بينما رمز ISO 3166-1 هو "gb" (وهو يشير تقنيًا إلى "المملكة المتحدة لبريطانيا العظمى وأيرلندا الشمالية"). يمكن أن تؤثّر المَعلمة في النتائج استنادًا إلى القانون الساري.
تاريخ التعديل الأخير: 2025-09-04 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-04 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Migrate to Place Details (New)\n\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\n\u003cbr /\u003e\n\n| This feature requires that you enable Places API (New), the next generation of the Places API. For more information, see [Enable APIs](/maps/documentation/places/android-sdk/legacy/cloud-setup#enabling-apis).\n\n\u003cbr /\u003e\n\nPlaces SDK for Android supports [Place Details (Legacy)](/maps/documentation/places/android-sdk/details-places).\nIf you are familiar with the Places SDK for Android (Legacy), [Place Details (New)](/maps/documentation/places/android-sdk/details-places)\nmakes the following changes:\n\n- Uses a new pricing model. For pricing information for all APIs, see [Places SDK for Android\n (New)](/maps/documentation/places/android-sdk/usage-and-billing#pricing-new).\n\n- You must initialize your app by calling the\n [`Places.initializeWithNewPlacesApiEnabled()`](/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/Places#initializeWithNewPlacesApiEnabled(android.content.Context,%20java.lang.String))\n method. For more information on selecting the Places API service, see\n [Set up your Google Cloud project](/maps/documentation/places/android-sdk/legacy/cloud-setup).\n\n- Field masking is required. You must specify which fields you want returned\n in the response. There is no default list of returned fields. If you omit\n this list, the methods return an error.\n\nThe following sections describe additional changes.\n\nAccess new place types\n----------------------\n\nEach place can have one or more *type* values associated with it. The\nPlaces SDK for Android version 3.3.0 and later adds many new type\nvalues. For the complete list, see [Expanded place\ntypes](/maps/documentation/places/android-sdk/legacy/choose-sdk#expanded_place_types).\n\nThe\n[`Place.getPlaceTypes()`](/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/model/Place#getPlaceTypes())\nmethod returns the type values as a list of string values. The values returned\ndepend on your version of the Places SDK for Android:\n\n- **Places SDK for Android (New)** : Returns the strings defined by\n Table A and Table B shown on [Place Types (New)](/maps/documentation/places/android-sdk/legacy/place-types), including all\n the added place types added in version 3.3.0.\n\n- **Places SDK for Android** : Returns the enums defined by\n `Place.Types`, which does not include the new types added in version 3.3.0\n and later.\n\nAccess place reviews\n--------------------\n\nThe Places SDK for Android (New) adds the\n[`Review`](/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/model/Review)\nclass, which contains a review of a place. The `Place` object can contain up to\nfive reviews.\n\nThe `Review` class can also contain an attribution and an author attribution. If\nyou display the review in your app, then you must also display any attribution\nor author attribution. For more information, see [Display a\nreview](/maps/documentation/places/android-sdk/legacy/policies#reviews).\n\nFor more information, see the documentation on\n[attributions](/maps/documentation/places/ios-sdk/policies#other_attribution_requirements).\n\nAccess place name language code\n-------------------------------\n\nIn the Places SDK for Android (Legacy),\n[`Place.getName()`](/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/model/Place#public-abstract-string-getname)\nmethod returns a text string containing the name of a place. To populate the\n`Place` object with the place name, you must include the\n`Place.Field.DISPLAY_NAME` in the field list of the place details request.\n\nThe `Place` object now contains the language code for the name string. To\npopulate the `Place` object with language code, you must:\n\n1. Include the `Place.Field.DISPLAY_NAME` in the field list of the request.\n This value configures response to include both the place name and language\n code in the `Place` object.\n\n2. Call\n [`PlacesClient.fetchPlace()`](/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/net/PlacesClient#fetchPlace(com.google.android.libraries.places.api.net.FetchPlaceRequest)).\n `PlacesClient.findCurrentPlace()` does not support the language code field.\n\n3. Use the [`Place.getNameLanguageCode()`](/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/model/Place#public-abstract-string-getnamelanguagecode)\n method to access the language code field in the `Place` object.\n\nSet region code\n---------------\n\nPlaces SDK for Android (New) adds the region code request parameter to\nPlace Details. The region code is used to format the response, specified as a\n[two-character CLDR code](https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html)\nvalue. This parameter can also have a bias effect on the search results. There\nis no default value. You must enable the new SDK to set the region code.\n\nIf the country name of the address field in the response matches the region\ncode, the country code is omitted from address.\n\nMost CLDR codes are identical to ISO 3166-1 codes, with some notable exceptions.\nFor example, the United Kingdom's ccTLD is \"uk\" (.co.uk) while its ISO 3166-1\ncode is \"gb\" (technically for the entity of \"The United Kingdom of Great Britain\nand Northern Ireland\"). The parameter can affect results based on applicable\nlaw.\n\nExample request\n---------------\n\nFor a complete example, see [Place Details\n(New)](/maps/documentation/places/android-sdk/details-place)."]]