PlaceMarker

@CarProtocol
class PlaceMarker


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

Summary

Nested types

A builder of PlaceMarker.

Constants

const Int

Represents a marker icon.

const Int

Represents a marker image.

Public functions

Boolean
equals(other: Any?)
CarColor?

Returns the marker color or null if not set.

CarIcon?

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

Int

Returns the type of icon used with this marker.

CarText?

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

Int
String

Constants

TYPE_ICON

Added in 1.0.0
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

Added in 1.0.0
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

equals

Added in 1.4.0-rc02
fun equals(other: Any?): Boolean

getColor

Added in 1.0.0
fun getColor(): CarColor?

Returns the marker color or null if not set.

See setColor on rules related to how the color is applied.

getIcon

Added in 1.0.0
fun getIcon(): CarIcon?

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

getIconType

Added in 1.0.0
fun getIconType(): Int

Returns the type of icon used with this marker.

getLabel

Added in 1.0.0
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.

hashCode

Added in 1.4.0-rc02
fun hashCode(): Int

toString

Added in 1.4.0-rc02
fun toString(): String