تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تعدّل هذه السمة الخريطة الأساسية في "خرائط Google". تسمح بما يلي:
1) ضبط MapType الحالي 2) توفير أنماط مخصّصة للخريطة الأساسية (MapTypeStyles) 3) ضبط قائمة mapTypesIds المتاحة للخريطة الأساسية
إذا تم استدعاؤها بدون مَعلمات، ستعيد ضبط نوع الخريطة على الإعداد التلقائي في Google.
تعرض هذه السمة الخريطة.
الاستخدام
المرتجعات
Map.setOptions(mapTypeId, styles, types)
ui.Map
الوسيطة
النوع
التفاصيل
mapTypeId
سلسلة، اختياري
تمثّل هذه السمة نوع الخريطة الأساسية المطلوب ضبطها. يمكن أن تكون إحدى القيم التالية: "ROADMAP" أو "SATELLITE" أو "HYBRID" أو "TERRAIN" لاختيار أحد أنواع الخرائط العادية في Google Maps API، أو أحد المفاتيح المحدّدة في قاموس opt_styles. إذا تم تركها فارغة وتم تحديد نمط واحد فقط في opt_styles، سيتم استخدام هذا النمط.
styles
الكائن، اختياري
قاموس لعناصر MapTypeStyle المخصّصة التي يتم تحديد مفاتيحها باسم سيظهر في عناصر التحكّم في نوع الخريطة. يُرجى الاطّلاع على: https://developers.google.com/maps/documentation/javascript/reference#MapTypeStyle
types
List<String>, اختياري
قائمة بمعرّفات mapTypeIds التي يجب إتاحتها. في حال عدم تضمينها، ولكن تم تحديد opt_styles، يتم إلحاق جميع مفاتيح الأنماط بأنواع الخرائط العادية في Google Maps API.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["Modifies the Google Maps basemap by setting the map type, providing custom styles, and controlling available map types."],["Accepts parameters to change the basemap's appearance or resets to the default Google Maps style when called without parameters."],["Offers flexibility in styling through custom MapTypeStyle objects and allows for selection from standard Google Maps API map types or custom styles."],["Uses the `setOptions()` method with arguments for mapTypeId, styles, and types to implement the modifications."],["Returns the ui.Map object after applying the specified options."]]],["This function, `Map.setOptions()`, modifies the Google Maps basemap. It can set the `mapTypeId` to \"ROADMAP,\" \"SATELLITE,\" \"HYBRID,\" or \"TERRAIN,\" or to a custom style from the `styles` dictionary. Custom styles (`styles`) are defined as `MapTypeStyle` objects. The available `mapTypeIds` displayed in the basemap can be defined in `types`. If called without arguments, the function reverts to the default Google map type. It returns the modified `ui.Map` object.\n"]]