يتوفّر برنامج عرض خرائط مُحسَّن اعتبارًا من الإصدار 18.0.0 من حزمة تطوير البرامج بالاستناد إلى بيانات "خرائط Google" لتطبيقات Android. يوفّر أداة العرض هذه العديد من التحسينات، بما في ذلك إمكانية تصميم الخرائط باستخدام السحابة الإلكترونية، في "حزمة تطوير البرامج بالاستناد إلى بيانات خرائط Google" لنظام التشغيل Android.
مع طرح الإصدار 18.2.0 من "حزمة تطوير البرامج بالاستناد إلى بيانات خرائط Google للتطبيقات المتوافقة مع Android"، بدّلت Google عارض الخريطة التلقائي من عارض الخريطة القديم إلى عارض الخريطة المحسّن. يعني هذا التغيير أنّه يتم الآن استخدام أداة عرض الخرائط المطوّرة تلقائيًا في تطبيقك عند إنشاء تطبيق جديد أو إعادة إنشاء تطبيق حالي.
إنشاء رقم تعريف خريطة
لإنشاء معرّف خريطة جديد، اتّبِع الخطوات الواردة في مقالة إنشاء معرّف خريطة. تأكَّد من ضبط نوع الخريطة على Android.
تعديل رمز تهيئة الخريطة
تتطلّب هذه الخطوة معرّف الخريطة الذي أنشأته للتو. يمكنك العثور عليه في صفحة إدارة الخرائط.
تتطلّب "محدّدات المواقع المتقدّمة" رقم تعريف خريطة. في حال عدم توفّر رقم تعريف الخريطة أو إذا تم تمرير رقم تعريف خريطة غير صالح، لا يمكن تحميل محدّدات المواقع المتقدّمة. استخدِم طريقة MapCapabilities.isAdvancedMarkersAvailable() للتحقّق مما إذا كانت العلامات المتقدّمة متاحة.
تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eAdvanced markers necessitate the utilization of the upgraded map renderer, available in Maps SDK for Android version 18.0.0 and later, and are enabled by default in version 18.2.0 and later.\u003c/p\u003e\n"],["\u003cp\u003eA crucial initial step involves creating a map ID within the Google Cloud console and integrating it into your map initialization code.\u003c/p\u003e\n"],["\u003cp\u003eIt is imperative to verify if advanced markers are supported on the device using \u003ccode\u003eMapCapabilities.isAdvancedMarkersAvailable()\u003c/code\u003e, and to provide a fallback mechanism, such as standard markers, if they are not.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers must ensure compatibility by checking device requirements for the new map renderer, as some devices might not support it.\u003c/p\u003e\n"]]],[],null,["# Get started\n\nSelect platform: [Android](/maps/documentation/android-sdk/advanced-markers/start \"View this page for the Android platform docs.\") [iOS](/maps/documentation/ios-sdk/advanced-markers/overview \"View this page for the iOS platform docs.\") [JavaScript](/maps/documentation/javascript/advanced-markers/start \"View this page for the JavaScript platform docs.\")\n\n\u003cbr /\u003e\n\nFollow these steps to get set up with advanced markers.\n\nEnable the new map renderer\n---------------------------\n\nAn upgraded map renderer is available as of version 18.0.0 of the\nMaps SDK for Android. This renderer brings many improvements, including\nsupport for Cloud-based maps styling, to Maps SDK for Android.\n\nWith the release of version 18.2.0 of the Maps SDK for Android, Google switched the\ndefault renderer from the legacy renderer to the upgraded map renderer. This\nchange means that the upgraded map renderer is now used by default in your app\nwhen you build a new app or rebuild an existing app.\n| **Caution:** To use advanced markers in your app, your app must be built using the upgraded map renderer. If you are adding advanced markers to an existing app, ensure that you rebuild the app so that your app uses the upgraded map renderer. For more information, see [New Map Renderer](/maps/documentation/android-sdk/renderer).\n\nCreate a map ID\n---------------\n\nTo create a new map ID, follow the steps at\n[Create a map ID](/maps/documentation/get-map-id#create-a-map-id). Make sure you\nset the Map type to **Android**.\n| **Important:** For testing, you can skip the step of creating and configuring a map ID by using a map ID of `DEMO_MAP_ID` in your app code. `DEMO_MAP_ID` is intended for testing purposes only. Don't use `DEMO_MAP_ID` in a production environment.\n\nUpdate your map initialization code\n-----------------------------------\n\nThis step requires the map ID you just created. It can be found on your [Maps\nManagement](https://console.cloud.google.com/google/maps-apis/studio/maps) page.\n\nTo add the map ID to your initialization code, see\n[Add the map ID to your app](/maps/documentation/get-map-id#add-a-map-id-to-your-app).\n\nCheck map capabilities (required)\n---------------------------------\n\nAdvanced markers requires a map ID. If the map ID is missing, or an\ninvalid map ID is passed, advanced markers cannot load. Use\nthe\n[`MapCapabilities.isAdvancedMarkersAvailable()`](/android/reference/com/google/android/gms/maps/model/MapCapabilities)\nmethod to check to see if advanced markers are supported.\n| **Caution:** Some devices might not support the new map renderer and therefore cannot display advanced markers. You must use `MapCapabilities` to check for support at runtime. If advanced markers are not supported, define a fallback option such as using standard [markers](/maps/documentation/android-sdk/marker). For device requirements for the new map renderer, see [Supported\ndevices](/maps/documentation/android-sdk/renderer#supported-devices). \n\n### Kotlin\n\n\n```kotlin\nval capabilities: MapCapabilities = googleMap.getMapCapabilities()\nSystem.out.println(\"is advanced marker enabled?\" + capabilities.isAdvancedMarkersAvailable())\n```\n\n\u003cbr /\u003e\n\n### Java\n\n\n```java\nMapCapabilities capabilities = googleMap.getMapCapabilities();\nSystem.out.println(\"is advanced marker enabled?\" + capabilities.isAdvancedMarkersAvailable());\n```\n\n\u003cbr /\u003e\n\nNext steps\n----------\n\n[Create an advanced marker](/maps/documentation/android-sdk/advanced-markers/add-marker)"]]