MarkerOptions

public class MarkerOptions implements Parcelable


Defines options for a 3D marker.

Summary

Constants

static final Parcelable.Creator<MarkerOptions>

Public constructors

Default constructor for MarkerOptions.

Public methods

int

The altitude mode of the marker.

int

The collision behavior of the marker.

String

The unique identifier of the marker.

@Nullable String

The label of the marker.

LatLngAltitude

The position of the marker.

@Nullable MarkerStyle

Returns the MarkerStyle class that contains ImageView|PinConfiguration with relevant details to render the entire marker contents.

int

The zIndex of the marker.

boolean

Whether the marker is drawn when occluded.

boolean

Whether the marker is extruded.

boolean

Whether the marker size is preserved.

void
setAltitudeMode(@AltitudeMode int altitudeMode)

Sets the altitude mode of the marker.

void
setCollisionBehavior(@CollisionBehavior int collisionBehavior)

Sets the collision behavior of the marker.

void
setDrawnWhenOccluded(boolean drawnWhenOccluded)

Sets whether the marker is drawn when occluded.

void
setExtruded(boolean extruded)

Sets whether the marker is extruded.

void

Sets the unique identifier of the marker.

void

Sets the label of the marker.

void

Sets the position of the marker.

void
setSizePreserved(boolean sizePreserved)

Sets whether the marker size is preserved.

void

Sets the ImageView (png image contents of the entire marker) to draw the image to render the entire marker contents.

void

Sets the PinConfiguration with relevant details to render the entire marker contents.

void
setZIndex(int zIndex)

Sets the zIndex of the marker.

void
writeToParcel(Parcel dest, int flags)

Extension functions

final void

Validates a specified MarkerOptions object.

Inherited Constants

From android.os.Parcelable
static final int
static final int

Inherited methods

From android.os.Parcelable
abstract int

Constants

CREATOR

public static final Parcelable.Creator<MarkerOptionsCREATOR

Public fields

altitudeMode

public int altitudeMode

collisionBehavior

public int collisionBehavior

id

public String id

label

public @Nullable String label

position

public LatLngAltitude position

style

public @Nullable MarkerStyle style

zIndex

public int zIndex

Public constructors

MarkerOptions

public MarkerOptions()

Default constructor for MarkerOptions.

Public methods

getAltitudeMode

@AltitudeMode
public int getAltitudeMode()

The altitude mode of the marker.

getCollisionBehavior

@CollisionBehavior
public int getCollisionBehavior()

The collision behavior of the marker.

getId

public String getId()

The unique identifier of the marker.

getLabel

public @Nullable String getLabel()

The label of the marker.

getPosition

public LatLngAltitude getPosition()

The position of the marker.

getStyle

public @Nullable MarkerStyle getStyle()

Returns the MarkerStyle class that contains ImageView|PinConfiguration with relevant details to render the entire marker contents.

getZIndex

public int getZIndex()

The zIndex of the marker.

isDrawnWhenOccluded

public boolean isDrawnWhenOccluded()

Whether the marker is drawn when occluded.

isExtruded

public boolean isExtruded()

Whether the marker is extruded.

isSizePreserved

public boolean isSizePreserved()

Whether the marker size is preserved.

setAltitudeMode

public void setAltitudeMode(@AltitudeMode int altitudeMode)

Sets the altitude mode of the marker.

setCollisionBehavior

public void setCollisionBehavior(@CollisionBehavior int collisionBehavior)

Sets the collision behavior of the marker.

setDrawnWhenOccluded

public void setDrawnWhenOccluded(boolean drawnWhenOccluded)

Sets whether the marker is drawn when occluded.

setExtruded

public void setExtruded(boolean extruded)

Sets whether the marker is extruded.

setId

public void setId(String id)

Sets the unique identifier of the marker.

setLabel

public void setLabel(@Nullable String label)

Sets the label of the marker.

setPosition

public void setPosition(LatLngAltitude position)

Sets the position of the marker.

setSizePreserved

public void setSizePreserved(boolean sizePreserved)

Sets whether the marker size is preserved.

setStyle

public void setStyle(@NonNull ImageView image)

Sets the ImageView (png image contents of the entire marker) to draw the image to render the entire marker contents. Replaces/overwrites previous marker content.

setStyle

public void setStyle(@NonNull PinConfiguration pinConfig)

Sets the PinConfiguration with relevant details to render the entire marker contents. Replaces/overwrites previous marker content.

setZIndex

public void setZIndex(int zIndex)

Sets the zIndex of the marker.

writeToParcel

public void writeToParcel(Parcel dest, int flags)

Extension functions

ValidatorsKt.validate

public final void ValidatorsKt.validate(@NonNull MarkerOptions receiver)

Validates a specified MarkerOptions object.

Throws
kotlin.IllegalArgumentException

If the MarkerOptions is not valid.