CollisionBehavior

@Retention(value = RetentionPolicy.SOURCE)
@IntDef(value = [CollisionBehavior.REQUIRED, CollisionBehavior.REQUIRED_AND_HIDES_OPTIONAL, CollisionBehavior.OPTIONAL_AND_HIDES_LOWER_PRIORITY])
public annotation CollisionBehavior


Enumeration of possible collision behaviors: required, optional, or optional and hides lower priority.

Summary

Constants

static final int

Specifies that the marker should only be displayed if it does not overlap with other markers.

static final int

Specifies that the marker should always be displayed regardless of collision.

static final int

Specifies that the marker should always be displayed regardless of collision.

Constants

OPTIONAL_AND_HIDES_LOWER_PRIORITY

public static final int OPTIONAL_AND_HIDES_LOWER_PRIORITY = 3

Specifies that the marker should only be displayed if it does not overlap with other markers. If two markers of this type would overlap, the one with the higher draw order is shown. If they have the same draw order, the one with the lower vertical screen position is shown.

REQUIRED

public static final int REQUIRED = 1

Specifies that the marker should always be displayed regardless of collision.

REQUIRED_AND_HIDES_OPTIONAL

public static final int REQUIRED_AND_HIDES_OPTIONAL = 2

Specifies that the marker should always be displayed regardless of collision. Markers with OPTIONAL_AND_HIDES_LOWER_PRIORITY collision behavior or the default map labels that overlap with this marker will be hidden.