PlaceMarker

public final class PlaceMarker
extends Object

java.lang.Object
   ↳ androidx.car.app.model.PlaceMarker


Describes how a place is to be displayed on a map.

Summary

Nested classes

class PlaceMarker.Builder

A builder of PlaceMarker

Constants

int TYPE_ICON

Represents a marker icon.

int TYPE_IMAGE

Represents a marker image.

Public methods

boolean equals(Object other)
CarColor getColor()

Returns the marker color or null if not set.

CarIcon getIcon()

Returns the CarIcon associated with this marker or null if not set.

int getIconType()

Returns the type of icon used with this marker.

CarText getLabel()

Returns the text that should be rendered as the marker's content or null if one is not set.

int hashCode()
String toString()

Inherited methods

Constants

TYPE_ICON

public static final int TYPE_ICON

Represents a marker icon.

Icons always have a tint applied to them.

Constant Value: 0 (0x00000000)

TYPE_IMAGE

public static final int TYPE_IMAGE

Represents a marker image.

No background will be applied.

Constant Value: 1 (0x00000001)

Public methods

equals

public boolean equals (Object other)

Parameters
other Object

Returns
boolean

getColor

public CarColor getColor ()

Returns the marker color or null if not set.

See PlaceMarker.Builder.setColor(CarColor) on rules related to how the color is applied.

Returns
CarColor

getIcon

public CarIcon getIcon ()

Returns the CarIcon associated with this marker or null if not set.

Returns
CarIcon

getIconType

public int getIconType ()

Returns the type of icon used with this marker.

Returns
int

getLabel

public CarText getLabel ()

Returns the text that should be rendered as the marker's content or null if one is not set.

Note that a PlaceMarker can only display either an icon or a text label. If both are set, then getIcon() will take precedence.

Returns
CarText

hashCode

public int hashCode ()

Returns
int

toString

public String toString ()

Returns
String