PinConfig.Glyph

public static class PinConfig.Glyph extends Object
implements Parcelable

Defines a glyph, which is the element at the center of an AdvancedMarker icon. By default, this is a circle, but can be configured to have a different color, or set to some text or bitmap.

Constant Summary

float DEFAULT_CIRCLE_RADIUS_DP
float X_COORDINATE_DP
float Y_COORDINATE_DP

Inherited Constant Summary

Public Constructor Summary

Glyph(String text)
Creates a glyph instance with the specified text.
Glyph(String text, int textColor)
Creates a glyph instance with the specified text, and color (in ARGB format).
Glyph(BitmapDescriptor bitmapDescriptor)
Creates a glyph instance with a specified bitmap.
Glyph(int glyphColor)
Creates a glyph instance, using the default circle, but with a custom color.

Public Method Summary

boolean
BitmapDescriptor
int
getGlyphColor()
Gets the color for this PinConfig.Glyph object.
String
getText()
Gets the text for this PinConfig.Glyph object.
int
getTextColor()
Gets the text color for this PinConfig.Glyph object.
int
void
writeToParcel(Parcel out, int flags)

Inherited Method Summary

Constants

public static final float DEFAULT_CIRCLE_RADIUS_DP

Constant Value: 5.0

public static final float X_COORDINATE_DP

Constant Value: 13.0

public static final float Y_COORDINATE_DP

Constant Value: 13.0

Public Constructors

public Glyph (String text)

Creates a glyph instance with the specified text. The default value is black (0xff000000). Use Glyph(String, int) to set text with a different color.

public Glyph (String text, int textColor)

Creates a glyph instance with the specified text, and color (in ARGB format).

public Glyph (BitmapDescriptor bitmapDescriptor)

Creates a glyph instance with a specified bitmap.

Because the default glyph circle has a radius of 5dp, it is recommended to provide a bitmap drawable that is 10x10 pixels for mdpi screens, along with alternative bitmap drawables, following a 3:4:6:8:12:16 scaling ratio between the six primary densities. This will ensure that the glyph size for a custom bitmap pin will be similar to the glyph size for a pin using the default circle glyph.

public Glyph (int glyphColor)

Creates a glyph instance, using the default circle, but with a custom color.

Public Methods

public boolean equals (Object o)

public BitmapDescriptor getBitmapDescriptor ()

Gets the BitmapDescriptor for this PinConfig.Glyph object.

Returns
  • The bitmap descriptor.

public int getGlyphColor ()

Gets the color for this PinConfig.Glyph object.

Returns
  • The glyph color.

public String getText ()

Gets the text for this PinConfig.Glyph object.

Returns
  • The glyph text.

public int getTextColor ()

Gets the text color for this PinConfig.Glyph object.

Returns
  • The text color.

public int hashCode ()

public void writeToParcel (Parcel out, int flags)