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"]],["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["Collision behavior dictates how markers are displayed when they overlap on the map."],["You can configure a marker's collision behavior using the `GMSAdvancedMarker.collisionBehavior` property with three options: `GMSCollisionBehaviorRequired`, `GMSCollisionBehaviorOptionalAndHidesLowerPriority`, and `GMSCollisionBehaviorRequiredAndHidesOptional`."],["`GMSCollisionBehaviorRequired` is the default, always displaying the marker regardless of overlap."],["`GMSCollisionBehaviorOptionalAndHidesLowerPriority` displays the marker only if it doesn't overlap with others, prioritizing higher `zIndex` and lower screen position in case of conflicts."],["`GMSCollisionBehaviorRequiredAndHidesOptional` always displays the marker and hides any with `GMSCollisionBehaviorOptionalAndHidesLowerPriority` behavior."]]],["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"]]