PlaceMarker
@CarProtocol
public final class PlaceMarker
Describes how a place is to be displayed on a map.
Summary
Nested types |
|---|
public final class PlaceMarker.BuilderA builder of |
Constants |
|
|---|---|
static final int |
TYPE_ICON = 0Represents a marker icon. |
static final int |
TYPE_IMAGE = 1Represents a marker image. |
Public methods |
|
|---|---|
boolean |
|
@Nullable CarColor |
getColor()Returns the marker color or |
@Nullable CarIcon |
getIcon()Returns the |
int |
Returns the type of icon used with this marker. |
@Nullable CarText |
getLabel()Returns the text that should be rendered as the marker's content or |
int |
hashCode() |
@NonNull String |
toString() |
Constants
TYPE_ICON
public static final int TYPE_ICON = 0
Represents a marker icon.
To minimize scaling artifacts across a wide range of car screens, apps should provide images targeting a 64 x 64 dp bounding box. If necessary, the icon will be scaled down while preserving its aspect ratio.
A tint color is expected to be provided via setTint. Otherwise, a default tint color as determined by the host will be applied.
TYPE_IMAGE
public static final int TYPE_IMAGE = 1
Represents a marker image.
To minimize scaling artifacts across a wide range of car screens, apps should provide images targeting a 72 x 72 dp bounding box. If necessary, the image will be scaled down while preserving its aspect ratio.
Public methods
getColor
public @Nullable CarColor getColor()
Returns the marker color or null if not set.
See setColor on rules related to how the color is applied.
getIcon
public @Nullable CarIcon getIcon()
Returns the CarIcon associated with this marker or null if not set.