PinConfig.Glyph

public static classPinConfig.GlyphextendsObject
implementsParcelable

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(Stringtext)
Creates a glyph instance with the specified text.
Glyph(Stringtext, 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 thisPinConfig.Glyph object.
String
getText()
Gets the text for thisPinConfig.Glyph object.
int
getTextColor()
Gets the text color for thisPinConfig.Glyph object.
int
void
writeToParcel(Parcelout, 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

publicGlyph(Stringtext)

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.

publicGlyph(Stringtext, int textColor)

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

publicGlyph(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.

publicGlyph(int glyphColor)

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

Public Methods

public booleanequals(Objecto)

publicBitmapDescriptor getBitmapDescriptor()

Gets theBitmapDescriptor for thisPinConfig.Glyph object.

Returns
  • The bitmap descriptor.

public intgetGlyphColor()

Gets the color for thisPinConfig.Glyph object.

Returns
  • The glyph color.

publicStringgetText()

Gets the text for thisPinConfig.Glyph object.

Returns
  • The glyph text.

public intgetTextColor()

Gets the text color for thisPinConfig.Glyph object.

Returns
  • The text color.

public inthashCode()

public voidwriteToParcel(Parcelout, int flags)