PinConfiguration

public class PinConfiguration implements Parcelable


A class to configure the contents of a 3D marker.

For example:

map.addMarker(
 markerOptions {
   position = sanFrancisco
   style = pinConfiguration {
     backgroundColor = Color.GREEN
     borderColor = Color.GREEN
     glyph = Glyph.fromColor(Color.RED)
   }
 }
)

map.addMarker(
 markerOptions {
   position = sanFrancisco
   style = pinConfiguration {
     backgroundColor = Color.GREEN
     glyph = Glyph.fromText("S")
   }
 }
)

Summary

Nested types

public final class PinConfiguration.Builder

Builder for PinConfiguration.

Constants

static final int
static final int
static final Parcelable.Creator<PinConfiguration>
static final int
static final int
static final int
static final int
static final float

Public constructors

Default constructor for PinConfiguration.

PinConfiguration(
    int backgroundColor,
    int borderColor,
    float scale,
    @Nullable Glyph glyph
)

Constructor for PinConfiguration with parameters for required fields.

Public methods

static @NonNull PinConfiguration.Builder

Creates a builder for PinConfiguration.

boolean
@ColorInt int

The background color of the pin.

@ColorInt int

The border color of the pin.

@Nullable Glyph

The glyph of the pin.

float

The scale of the pin.

int
void
setBackgroundColor(@ColorInt int backgroundColor)

Sets the background color of the pin.

void
setBorderColor(@ColorInt int borderColor)

Sets the border color of the pin.

void

Sets the glyph of the pin.

void
setScale(float scale)

Sets the scale of the pin.

void
writeToParcel(@NonNull Parcel out, int flags)

Inherited Constants

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

Inherited methods

From android.os.Parcelable
abstract int

Constants

BITMAP_LENGTH_DP

public static final int BITMAP_LENGTH_DP = 37

BITMAP_WIDTH_DP

public static final int BITMAP_WIDTH_DP = 26

CREATOR

public static final Parcelable.Creator<PinConfigurationCREATOR

DEFAULT_BACKGROUND_COLOR

public static final int DEFAULT_BACKGROUND_COLOR = -1424587

DEFAULT_BACKGROUND_COLOR_ABGR

public static final int DEFAULT_BACKGROUND_COLOR_ABGR = -13286422

DEFAULT_BORDER_COLOR

public static final int DEFAULT_BORDER_COLOR = -3857889

DEFAULT_BORDER_COLOR_ABGR

public static final int DEFAULT_BORDER_COLOR_ABGR = -14736699

DEFAULT_SCALE

public static final float DEFAULT_SCALE = 1.0f

Public fields

backgroundColor

public @ColorInt int backgroundColor

borderColor

public @ColorInt int borderColor

glyph

public @Nullable Glyph glyph

scale

public float scale

Public constructors

PinConfiguration

public PinConfiguration()

Default constructor for PinConfiguration.

PinConfiguration

public PinConfiguration(
    int backgroundColor,
    int borderColor,
    float scale,
    @Nullable Glyph glyph
)

Constructor for PinConfiguration with parameters for required fields.

Parameters
int backgroundColor

The background color of the pin in ARGB format.

int borderColor

The border color of the pin in ARGB format.

float scale

The scale of the pin.

@Nullable Glyph glyph

The glyph of the pin.

Public methods

builder

public static @NonNull PinConfiguration.Builder builder()

Creates a builder for PinConfiguration.

equals

public boolean equals(@Nullable Object o)

getBackgroundColor

public @ColorInt int getBackgroundColor()

The background color of the pin.

getBorderColor

public @ColorInt int getBorderColor()

The border color of the pin.

getGlyph

public @Nullable Glyph getGlyph()

The glyph of the pin.

getScale

public float getScale()

The scale of the pin.

hashCode

public int hashCode()

setBackgroundColor

public void setBackgroundColor(@ColorInt int backgroundColor)

Sets the background color of the pin.

setBorderColor

public void setBorderColor(@ColorInt int borderColor)

Sets the border color of the pin.

setGlyph

public void setGlyph(@NonNull Glyph glyph)

Sets the glyph of the pin.

setScale

public void setScale(float scale)

Sets the scale of the pin.

writeToParcel

public void writeToParcel(@NonNull Parcel out, int flags)