GMSCollisionBehaviorRequired (по умолчанию): Всегда отображать маркер независимо от столкновения. Это поведение по умолчанию. Не влияет на то, отображаются ли какие-либо другие маркеры или метки базовой карты.
GMSCollisionBehaviorOptionalAndHidesLowerPriority : Отображать маркер только в том случае, если он не перекрывается другими маркерами. Если два маркера этого типа перекрываются, отображается тот, у которого zIndex выше. Если у них одинаковый zIndex , отображается тот, у которого вертикальная позиция на экране ниже.
GMSCollisionBehaviorRequiredAndHidesOptional : Всегда отображать маркер независимо от столкновения и скрывать любые GMSCollisionBehaviorOptionalAndHidesLowerPriority . Отображать маркер только если он не перекрывается другими маркерами. Не GMSCollisionBehaviorRequired . Если два маркера этого типа будут перекрываться, отображается тот, у которого zIndex выше. Правила столкновений для маркеров с одинаковым zIndex не определены.
Быстрый
// 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-06-13 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"]]