الحصول على مفتاح واجهة برمجة التطبيقات وتفعيل Maps JavaScript API
قبل استخدام العلامات المتقدّمة، يجب أن يكون لديك مشروع على Cloud يتضمّن حسابًا للفوترة، ويجب تفعيل Maps JavaScript API. لمزيد من المعلومات، يُرجى الاطّلاع على إعداد مشروعك على Google Cloud.
تتطلّب "محدّدات المواقع المتقدّمة" توفير رقم تعريف خريطة. في حال عدم توفّر رقم تعريف الخريطة،
لا يمكن تحميل محدّدات المواقع المتقدّمة. كخطوة لتحديد المشاكل وحلّها، يمكنك إضافة أداة معالجة mapcapabilities_changed للاشتراك في التغييرات التي تطرأ على إمكانات الخريطة. استخدام "إمكانات الخريطة" اختياري، ولا يُنصح به إلا لأغراض الاختبار وتحديد المشاكل وحلّها، أو لأغراض التراجع عن وقت التشغيل.
// Optional: subscribe to map capability changes.map.addListener('mapcapabilities_changed',()=>{constmapCapabilities=map.getMapCapabilities();if(!mapCapabilities.isAdvancedMarkersAvailable){// Advanced markers are *not* available, add a fallback.}});
تاريخ التعديل الأخير: 2025-07-13 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-07-13 (حسب التوقيت العالمي المتفَّق عليه)"],[[["Get started with advanced markers by obtaining an API key, enabling the Maps JavaScript API, and creating a map ID."],["Update your map initialization code to include loading the advanced markers library and providing a map ID when instantiating the map."],["For testing purposes, use `DEMO_MAP_ID` as the map ID or utilize the provided example code, but replace the example map IDs for production."],["Optionally, check map capabilities to ensure advanced markers are available or to implement a fallback if they are not supported."]]],["To use advanced markers, you need a Cloud project with a billing account and the Maps JavaScript API enabled. First, obtain an API key and create a map ID, selecting JavaScript as the map type with either Vector or Raster options, or using `DEMO_MAP_ID` for testing. Update your map initialization code by loading the Maps JavaScript API and the advanced markers library. Instantiate the map with the created or demo map ID. Optionally, use a listener to check map capabilities.\n"]]