PlaceMarker
@CarProtocol
class PlaceMarker
Describes how a place is to be displayed on a map.
Summary
Nested types |
|---|
class PlaceMarker.BuilderA builder of |
Constants |
|
|---|---|
const Int |
TYPE_ICON = 0Represents a marker icon. |
const Int |
TYPE_IMAGE = 1Represents a marker image. |
Public functions |
|
|---|---|
Boolean |
|
CarColor? |
getColor()Returns the marker color or |
CarIcon? |
getIcon()Returns the |
Int |
Returns the type of icon used with this marker. |
CarText? |
getLabel()Returns the text that should be rendered as the marker's content or |
Int |
hashCode() |
String |
toString() |
Constants
TYPE_ICON
const val TYPE_ICON = 0: Int
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
const val TYPE_IMAGE = 1: Int
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 functions
getColor
fun getColor(): CarColor?
Returns the marker color or null if not set.
See setColor on rules related to how the color is applied.
getIcon
fun getIcon(): CarIcon?
Returns the CarIcon associated with this marker or null if not set.
getLabel
fun getLabel(): CarText?
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.