GMSCollisionBehaviorRequired (Default): Always display the marker
regardless of collision. This is the default behavior. Has no impact on
whether any other markers or basemap labels show.
GMSCollisionBehaviorOptionalAndHidesLowerPriority: Display the marker only
if it does not overlap with other markers. If two markers of this type would
overlap, the one with the higher zIndex is shown. If they have the same
zIndex, the one with the lower vertical screen position is shown.
GMSCollisionBehaviorRequiredAndHidesOptional: Always display the marker
regardless of collision, and hide any
GMSCollisionBehaviorOptionalAndHidesLowerPriority. Display the marker only
if it does not overlap with other markers. Does not
GMSCollisionBehaviorRequired. If two markers of this type would overlap,
the one with the higher zIndex is shown. Collision rules for markers with
the same zIndex are undefined.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-07 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"]]