يمكنك تطبيق أنماط مخصّصة من خلال إدخال تعريفات أنماط JSON مضمّنة على ما يلي:
الخريطة التلقائية
أنواع الخرائط التي يمكن للمستخدم التبديل بينها ضمن إطار خريطة واحد
تحديد الأنماط للعناصر
لتطبيق أنماط على ميزات وعناصر مختلفة في خريطة، أنشئ مجموعة من عناصر MapTypeStyle تحدّد طريقة تصميم الخريطة.
تتّخذ الصفيفة الشكل التالي:
varstylesArray=[{featureType:'',elementType:'',stylers:[{color:''},{visibility:''},// Add any stylers you need.]},{featureType:'',// Add the stylers you need.}]
للاطّلاع على قائمة بجميع القيم المتاحة لكل من featureType وelementType وstylers، يُرجى الرجوع إلى مرجع نمط JSON.
لتعديل أنماط الخريطة التلقائية، اضبط السمة styles الخاصة بالخريطة في العنصر MapOptions على مصفوفة الأنماط عند استيفاء أحد الشرطين التاليين:
إنشاء خريطتك
أو عند استدعاء الطريقة Map.setOptions
تؤثّر التغييرات في التصنيفات والطرق في جميع أنواع الخرائط، بما في ذلك التضاريس والأقمار الصناعية والخرائط المختلطة وأنواع الخرائط التلقائية.
تطبيق أنماط على نوع خريطة
تعرض الصورة التالية نوع خريطة تمت إضافته باسم خريطة منمّقة في عنصر التحكّم في أعلى يمين الخريطة. للاطّلاع على نموذج الرمز، انتقِل إلى أنواع الخرائط ذات الأنماط.
لإنشاء نوع خريطة منمّقة، اضبط مصفوفة الأنماط على كائن StyledMapType. لا يؤثر إنشاء نوع خريطة منمّقة جديد في نمط أنواع الخرائط التلقائية.
تاريخ التعديل الأخير: 2025-07-09 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-09 (حسب التوقيت العالمي المتفَّق عليه)"],[[["Customize the appearance of your maps using embedded JSON style declarations for the default map and selectable map types."],["Style features and elements within the map by creating an array of `MapTypeStyle` objects defining the desired appearance, with the `featureType`, `elementType`, and `stylers` properties determining specific modifications."],["Utilize the Maps Platform Styling Wizard to quickly generate JSON styling objects, simplifying the process of creating custom map styles."],["Apply styles to the default map by setting the `styles` property in the `MapOptions` object during map creation or by using the `Map.setOptions` method."],["Create styled map types by setting the style array to a `StyledMapType` object, enabling the addition of custom map styles without impacting the default map types."]]],["Custom styling for maps can be applied via embedded JSON style declarations to default maps or user-switchable map types. Create an array of `MapTypeStyle` objects specifying `featureType`, `elementType`, and `stylers` to define styling. For consistent styling across apps, use cloud customization with a map ID. Use the Maps Platform Styling Wizard to quickly generate JSON styling or apply styles by setting the map's `styles` property within the `MapOptions` object or the `Map.setOptions` method.\n"]]