GMSCollisionBehaviorRequired (ברירת מחדל): תמיד להציג את הסמן, גם אם יש חפיפה. זאת פעולת ברירת המחדל. לא משפיע על הצגת סמנים או תוויות אחרים במפת הבסיס.
GMSCollisionBehaviorOptionalAndHidesLowerPriority: הצגת הסמן רק אם הוא לא חופף לסמנים אחרים. אם שני סמנים מהסוג הזה חופפים, יוצג הסמן עם הערך הגבוה יותר של zIndex. אם יש להם אותו zIndex, מוצג זה שנמצא במיקום נמוך יותר במסך.
GMSCollisionBehaviorRequiredAndHidesOptional: תמיד להציג את הסמן, גם אם יש חפיפה, ולהסתיר את כל ה-GMSCollisionBehaviorOptionalAndHidesLowerPriority. הצגת הסמן רק אם הוא לא חופף לסמנים אחרים. לא
GMSCollisionBehaviorRequired. אם שני סמנים מהסוג הזה חופפים, מוצג הסמן עם הערך הגבוה יותר של zIndex. לא הוגדרו כללי התנגשות לסמנים עם אותו zIndex.
Swift
// Defines a marker to always display and hide any marker or label overlay with this marker in the base mapmarker.collisionBehavior=.requiredAndHidesOptional
Objective-C
// Defines a marker to always display and hide any marker or label overlay with this marker in the base mapmarker.collisionBehavior=GMSCollisionBehaviorRequiredAndHidesOptional
[[["התוכן קל להבנה","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"]],["עדכון אחרון: 2026-10-16 (שעון UTC)."],[],["Collision behavior dictates marker display during overlaps. Options include: `Required` (always visible, default); `OptionalAndHidesLowerPriority` (visible only if no overlap, higher `zIndex` prevails); and `RequiredAndHidesOptional` (always visible, hides `OptionalAndHidesLowerPriority`). `zIndex` determines priority in overlapping markers, with lower vertical screen position breaking ties in specific cases. Setting `collisionBehavior` in code allows customization of display logic. It's recommended to use the same behavior for all advanced markers.\n"]]