Marker.CollisionBehavior
Indicates how the marker is dealt with when involved in a collision with other markers or base
map labels.
Constant Summary
int |
OPTIONAL_AND_HIDES_LOWER_PRIORITY |
Set if the marker may be replaced/overlapped by a required marker or replaced by an
OPTIONAL_AND_HIDES_LOWER_PRIORITY marker with higher priority. |
int |
REQUIRED |
Set if the marker must be placed and may be overlapped with other markers or labels. |
int |
REQUIRED_AND_HIDES_OPTIONAL |
Set if the marker must be placed and will hide any OPTIONAL_AND_HIDES_LOWER_PRIORITY markers
or labels that would overlap with the marker. |
Inherited Method Summary
From interface
java.lang.annotation.Annotation
abstract
Class<? extends Annotation>
|
annotationType()
|
abstract
boolean
|
equals(Object arg0)
|
abstract
int
|
hashCode()
|
abstract
String
|
toString()
|
Constants
public
static
final
int
OPTIONAL_AND_HIDES_LOWER_PRIORITY
Set if the marker may be replaced/overlapped by a required marker or replaced by an
OPTIONAL_AND_HIDES_LOWER_PRIORITY marker with higher priority.
Constant Value:
2
public
static
final
int
REQUIRED
Set if the marker must be placed and may be overlapped with other markers or labels. This is
the default behavior.
Constant Value:
0
public
static
final
int
REQUIRED_AND_HIDES_OPTIONAL
Set if the marker must be placed and will hide any OPTIONAL_AND_HIDES_LOWER_PRIORITY markers
or labels that would overlap with the marker. It may be overlapped with other required
markers.
Constant Value:
1
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-16 UTC.
[null,null,["Last updated 2025-06-16 UTC."],[[["`Marker.CollisionBehavior` is an annotation that dictates how markers behave during collisions with other markers or map labels."],["It offers three collision behaviors: `REQUIRED`, `REQUIRED_AND_HIDES_OPTIONAL`, and `OPTIONAL_AND_HIDES_LOWER_PRIORITY`, controlling marker placement and visibility during overlaps."],["`REQUIRED` markers are always displayed, potentially overlapping others; `REQUIRED_AND_HIDES_OPTIONAL` markers are also always displayed but hide optional markers they overlap; `OPTIONAL_AND_HIDES_LOWER_PRIORITY` markers might be hidden by required markers or higher priority optional markers."],["By default, markers have `REQUIRED` collision behavior, meaning they will be displayed and may overlap with others."]]],[]]