GoogleNavigation Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSPinImageGlyph
@interface GMSPinImageGlyph : NSObject
Provides a custom pin image glyph for an advanced marker.
-
Declaration
Objective-C
- (instancetype)init NS_UNAVAILABLE;
-
Declaration
Swift
var text: String? { get }
Objective-C
@property(nonatomic, nullable, readonly) NSString *text
-
Declaration
Swift
var textColor: UIColor? { get }
Objective-C
@property(nonatomic, nullable, readonly) UIColor *textColor
-
Declaration
Swift
var image: UIImage? { get }
Objective-C
@property(nonatomic, nullable, readonly) UIImage *image
-
Declaration
Swift
var glyphColor: UIColor? { get }
Objective-C
@property(nonatomic, nullable, readonly) UIColor *glyphColor
-
Returns a glyph model with the given text.
Declaration
Swift
init(text: String, textColor: UIColor)
Objective-C
- (nonnull GMSPinImageGlyph *)initWithText:(nonnull NSString *)text
textColor:(nonnull UIColor *)textColor;
Parameters
text
|
A NSString object to use as the glyph.
|
textColor
|
A UIColor object to use to render the text.
|
Return Value
An initialized glyph model.
-
Returns a glyph model with the given text.
Declaration
Swift
init(image: UIImage)
Objective-C
- (nonnull GMSPinImageGlyph *)initWithImage:(nonnull UIImage *)image;
Parameters
image
|
A UIImage object to use as the glyph.
|
Return Value
An initialized glyph model.
-
Returns a glyph model with the given glyph color.
Declaration
Swift
init(glyphColor: UIColor)
Objective-C
- (nonnull GMSPinImageGlyph *)initWithGlyphColor:(nonnull UIColor *)glyphColor;
Parameters
glyphColor
|
A UIColor object to use to render the glyph.
|
Return Value
An initialized glyph model.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMSPinImageGlyph\u003c/code\u003e provides a way to customize the appearance of markers on a map by using text, images, or glyph colors.\u003c/p\u003e\n"],["\u003cp\u003eIt offers three initialization methods: one for text with color, one for images, and one for glyph colors.\u003c/p\u003e\n"],["\u003cp\u003eThe class exposes properties to access the text, text color, image, and glyph color used for the marker.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eGMSPinImageGlyph\u003c/code\u003e is intended for advanced marker customization and is not the standard approach for basic marker styling.\u003c/p\u003e\n"]]],["GMSPinImageGlyph provides custom pin image glyphs for advanced markers. It offers properties like `text`, `textColor`, `image`, and `glyphColor` to customize the glyph's appearance. Initialization is possible via methods `initWithText:textColor:`, `initWithImage:`, and `initWithGlyphColor:`. These create a glyph model using either text and its color, an image, or a specific glyph color, respectively. The standard init method is unavailable. The glyph properties are read only.\n"],null,["# GoogleNavigation Framework Reference\n\nGMSPinImageGlyph\n================\n\n @interface GMSPinImageGlyph : NSObject\n\nProvides a custom pin image glyph for an advanced marker.\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)GMSPinImageGlyph(im)init)\n\n `\n ` \n Unavailable \n\n #### Declaration\n\n Objective-C \n\n - (instancetype)init NS_UNAVAILABLE;\n\n- `\n ``\n ``\n `\n\n ### [text](#/c:objc(cs)GMSPinImageGlyph(py)text)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n var text: String? { get }\n\n Objective-C \n\n @property(nonatomic, nullable, readonly) NSString *text\n\n- `\n ``\n ``\n `\n\n ### [textColor](#/c:objc(cs)GMSPinImageGlyph(py)textColor)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n var textColor: UIColor? { get }\n\n Objective-C \n\n @property(nonatomic, nullable, readonly) UIColor *textColor\n\n- `\n ``\n ``\n `\n\n ### [image](#/c:objc(cs)GMSPinImageGlyph(py)image)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n var image: UIImage? { get }\n\n Objective-C \n\n @property(nonatomic, nullable, readonly) UIImage *image\n\n- `\n ``\n ``\n `\n\n ### [glyphColor](#/c:objc(cs)GMSPinImageGlyph(py)glyphColor)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n var glyphColor: UIColor? { get }\n\n Objective-C \n\n @property(nonatomic, nullable, readonly) UIColor *glyphColor\n\n- `\n ``\n ``\n `\n\n ### [-initWithText:textColor:](#/c:objc(cs)GMSPinImageGlyph(im)initWithText:textColor:)\n\n `\n ` \n Returns a glyph model with the given text. \n\n #### Declaration\n\n Swift \n\n init(text: String, textColor: UIColor)\n\n Objective-C \n\n - (nonnull GMSPinImageGlyph *)initWithText:(nonnull NSString *)text\n textColor:(nonnull UIColor *)textColor;\n\n #### Parameters\n\n |-------------------|-----------------------------------------------|\n | ` `*text*` ` | A `NSString` object to use as the glyph. |\n | ` `*textColor*` ` | A `UIColor` object to use to render the text. |\n\n #### Return Value\n\n An initialized glyph model.\n- `\n ``\n ``\n `\n\n ### [-initWithImage:](#/c:objc(cs)GMSPinImageGlyph(im)initWithImage:)\n\n `\n ` \n Returns a glyph model with the given text. \n\n #### Declaration\n\n Swift \n\n init(image: UIImage)\n\n Objective-C \n\n - (nonnull GMSPinImageGlyph *)initWithImage:(nonnull UIImage *)image;\n\n #### Parameters\n\n |---------------|-----------------------------------------|\n | ` `*image*` ` | A `UIImage` object to use as the glyph. |\n\n #### Return Value\n\n An initialized glyph model.\n- `\n ``\n ``\n `\n\n ### [-initWithGlyphColor:](#/c:objc(cs)GMSPinImageGlyph(im)initWithGlyphColor:)\n\n `\n ` \n Returns a glyph model with the given glyph color. \n\n #### Declaration\n\n Swift \n\n init(glyphColor: UIColor)\n\n Objective-C \n\n - (nonnull GMSPinImageGlyph *)initWithGlyphColor:(nonnull UIColor *)glyphColor;\n\n #### Parameters\n\n |--------------------|------------------------------------------------|\n | ` `*glyphColor*` ` | A `UIColor` object to use to render the glyph. |\n\n #### Return Value\n\n An initialized glyph model."]]