Page Summary
-
Marker.CollisionBehavioris 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, andOPTIONAL_AND_HIDES_LOWER_PRIORITY, controlling marker placement and visibility during overlaps. -
REQUIREDmarkers are always displayed, potentially overlapping others;REQUIRED_AND_HIDES_OPTIONALmarkers are also always displayed but hide optional markers they overlap;OPTIONAL_AND_HIDES_LOWER_PRIORITYmarkers might be hidden by required markers or higher priority optional markers. -
By default, markers have
REQUIREDcollision behavior, meaning they will be displayed and may overlap with others.
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
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.
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.
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.