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
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eCollision behavior dictates how markers are displayed when they overlap on the map.\u003c/p\u003e\n"],["\u003cp\u003eYou can configure a marker's collision behavior using the \u003ccode\u003eGMSAdvancedMarker.collisionBehavior\u003c/code\u003e property with three options: \u003ccode\u003eGMSCollisionBehaviorRequired\u003c/code\u003e, \u003ccode\u003eGMSCollisionBehaviorOptionalAndHidesLowerPriority\u003c/code\u003e, and \u003ccode\u003eGMSCollisionBehaviorRequiredAndHidesOptional\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eGMSCollisionBehaviorRequired\u003c/code\u003e is the default, always displaying the marker regardless of overlap.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eGMSCollisionBehaviorOptionalAndHidesLowerPriority\u003c/code\u003e displays the marker only if it doesn't overlap with others, prioritizing higher \u003ccode\u003ezIndex\u003c/code\u003e and lower screen position in case of conflicts.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eGMSCollisionBehaviorRequiredAndHidesOptional\u003c/code\u003e always displays the marker and hides any with \u003ccode\u003eGMSCollisionBehaviorOptionalAndHidesLowerPriority\u003c/code\u003e behavior.\u003c/p\u003e\n"]]],["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"],null,["# Control collision behavior\n\nSelect platform: [Android](/maps/documentation/android-sdk/advanced-markers/collision-behavior \"View this page for the Android platform docs.\") [iOS](/maps/documentation/ios-sdk/advanced-markers/collision-behavior \"View this page for the iOS platform docs.\") [JavaScript](/maps/documentation/javascript/advanced-markers/collision-behavior \"View this page for the JavaScript platform docs.\")\n\n\u003cbr /\u003e\n\nCollision behavior controls how a marker displays if it collides (overlaps) with\nanother marker.\n\nSet the collision behavior for a marker\n---------------------------------------\n\n\nTo set collision behavior, set\n[`GMSAdvancedMarker.collisionBehavior`](/maps/documentation/ios-sdk/reference/objc/Classes/GMSAdvancedMarker#collisionbehavior) to\none of the following:\n\n- `GMSCollisionBehaviorRequired` (Default): Always display the marker\n regardless of collision. This is the default behavior. Has no impact on\n whether any other markers or basemap labels show.\n\n- `GMSCollisionBehaviorOptionalAndHidesLowerPriority`: Display the marker only\n if it does not overlap with other markers. If two markers of this type would\n overlap, the one with the higher `zIndex` is shown. If they have the same\n `zIndex`, the one with the lower vertical screen position is shown.\n\n- `GMSCollisionBehaviorRequiredAndHidesOptional`: Always display the marker\n regardless of collision, and hide any\n `GMSCollisionBehaviorOptionalAndHidesLowerPriority`. Display the marker only\n if it does not overlap with other markers. Does not\n `GMSCollisionBehaviorRequired`. If two markers of this type would overlap,\n the one with the higher `zIndex` is shown. Collision rules for markers with\n the same `zIndex` are undefined.\n\n | **Note:** For optimal collision behavior, create all advanced markers with the same type. This includes advanced markers represented with an [iconView](/maps/documentation/ios-sdk/advanced-markers/customization#use_the_iconview_property), icon or default capabilities.\n\n### Swift\n\n```swift\n// Defines a marker to always display and hide any marker or label overlay with this marker in the base map\nmarker.collisionBehavior = .requiredAndHidesOptional\n```\n\n### Objective-C\n\n```objective-c\n// Defines a marker to always display and hide any marker or label overlay with this marker in the base map\nmarker.collisionBehavior = GMSCollisionBehaviorRequiredAndHidesOptional\n```"]]