GoogleMaps Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSPinImage
@interface GMSPinImage : UIImage
Provides a custom pin image for an advanced marker.
-
Declaration
Objective-C
- (instancetype)init NS_UNAVAILABLE;
-
Returns an image style with the given pin image options that can be used as a standalone
UIImage
, or as the icon of an Advanced Marker only.
Declaration
Objective-C
+ (nonnull GMSPinImage *)pinImageWithOptions:
(nonnull GMSPinImageOptions *)options;
Return Value
An image configured with the provided options.
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\u003eGMSPinImage\u003c/code\u003e provides custom pin images for advanced markers in Google Maps.\u003c/p\u003e\n"],["\u003cp\u003eIt is initialized using \u003ccode\u003epinImageWithOptions:\u003c/code\u003e with a \u003ccode\u003eGMSPinImageOptions\u003c/code\u003e object for customization.\u003c/p\u003e\n"],["\u003cp\u003eYou can use the resulting image as a standalone \u003ccode\u003eUIImage\u003c/code\u003e or as an icon for an advanced marker.\u003c/p\u003e\n"]]],["`GMSPinImage` provides custom pin images for advanced markers. It cannot be initialized directly using `-init`. Instead, use `+pinImageWithOptions:` which accepts `GMSPinImageOptions` to customize the image. This method returns a `UIImage` that can be used independently or as the icon for an advanced marker. `GMSPinImageOptions` are used to define the specific appearance of the customized image.\n"],null,["# GoogleMaps Framework Reference\n\nGMSPinImage\n===========\n\n @interface GMSPinImage : UIImage\n\nProvides a custom pin image for an advanced marker.\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)GMSPinImage(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 ### [+pinImageWithOptions:](#/c:objc(cs)GMSPinImage(cm)pinImageWithOptions:)\n\n `\n ` \n Returns an image style with the given pin image options that can be used as a standalone\n `UIImage`, or as the icon of an Advanced Marker only. \n\n #### Declaration\n\n Swift \n\n /*not inherited*/ init(options: ../Classes/GMSPinImageOptions.html)\n\n Objective-C \n\n + (nonnull GMSPinImage *)pinImageWithOptions:\n (nonnull ../Classes/GMSPinImageOptions.html *)options;\n\n #### Parameters\n\n |-----------------|---------------------------------------------------------------------------------------------------------|\n | ` `*options*` ` | A [GMSPinImageOptions](../Classes/GMSPinImageOptions.html) object to use to customize the marker image. |\n\n #### Return Value\n\n An image configured with the provided options."]]