AI-generated Key Takeaways
-
PinConfig.Glyph defines the element at the center of an AdvancedMarker icon, defaulting to a circle but allowing customization with color, text, or a bitmap.
-
Glyph instances can be created with text (with or without custom color), a bitmap, or a custom color for the default circle.
-
The class includes methods to retrieve the bitmap descriptor, glyph color, text, and text color associated with a Glyph object.
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(int glyphColor)
Creates a glyph instance, using the default circle, but with a custom color.
|
Public Method Summary
| boolean | |
| BitmapDescriptor |
getBitmapDescriptor()
Gets the
BitmapDescriptor
for this PinConfig.Glyph
object.
|
| 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 |
hashCode()
|
| void |
writeToParcel(Parcel out, int
flags)
|
Inherited Method Summary
Constants
public static final float DEFAULT_CIRCLE_RADIUS_DP
public static final float X_COORDINATE_DP
public static final float Y_COORDINATE_DP
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.