GoogleRidesharingConsumer Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMTCMutableMarkerStyleOptions
Mutable data object that holds marker’s customization properties.
Note: When applying the style options for a marker with the
GMTCCustomizableMarkerTypeTripVehicle
type, you must explicitly
set the isFlat
property to YES. Otherwise, when the map is rotated in 3D
mode, the vehicle heading won’t be aligned with the rotated direction.
-
The ground anchor for the marker. Defaults to {0.5f, 0.5f}
Declaration
Swift
var groundAnchor: CGPoint { get set }
Objective-C
@property (nonatomic) CGPoint groundAnchor;
-
Boolean that determines the visibility of the marker. Defaults to YES.
Declaration
Swift
var isVisible: Bool { get set }
Objective-C
@property (nonatomic) BOOL isVisible;
-
Marker view to render. If left nil, defaults to the icon property value.
Declaration
Swift
var iconView: UIView? { get set }
Objective-C
@property (nonatomic, nullable) UIView *iconView;
-
The icon to display for the marker. If there is no iconView, and icon is left nil,
the marker’s default icon is used.
Declaration
Swift
var icon: UIImage? { get set }
Objective-C
@property (nonatomic, nullable) UIImage *icon;
-
The z-index specifies the stack order of this marker. Defaults to 0.
Declaration
Swift
var zIndex: Int32 { get set }
Objective-C
@property (nonatomic) int32_t zIndex;
-
Whether the marker is flat against the map or a billboard facing the camera. Defaults to NO.
Declaration
Swift
var isFlat: Bool { get set }
Objective-C
@property (nonatomic) BOOL isFlat;
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\u003eGMTCMutableMarkerStyleOptions\u003c/code\u003e is a mutable data object used to customize the properties of a marker.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egroundAnchor\u003c/code\u003e property defines the marker's anchor point, defaulting to the center at {0.5f, 0.5f}.\u003c/p\u003e\n"],["\u003cp\u003eMarkers can be made visible or hidden using the \u003ccode\u003eisVisible\u003c/code\u003e property, which defaults to YES.\u003c/p\u003e\n"],["\u003cp\u003eMarkers can use a custom view via \u003ccode\u003eiconView\u003c/code\u003e, or an image with the \u003ccode\u003eicon\u003c/code\u003e property, otherwise it uses the default icon.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ezIndex\u003c/code\u003e property determines the marker's stacking order, defaulting to 0, and \u003ccode\u003eisFlat\u003c/code\u003e determines if it is flat against the map or a billboard facing the camera, which defaults to NO.\u003c/p\u003e\n"]]],["`GMTCMutableMarkerStyleOptions` customizes marker properties. Key actions include setting the `groundAnchor` (default {0.5f, 0.5f}), toggling `isVisible` (default YES), defining a custom `iconView` or `icon` (defaulting to the marker's icon), adjusting `zIndex` (default 0), and setting `isFlat` (default NO). For `GMTCCustomizableMarkerTypeTripVehicle` markers, setting `isFlat` to YES is mandatory for correct heading alignment in 3D map rotation.\n"],null,["# GoogleRidesharingConsumer Framework Reference\n\nGMTCMutableMarkerStyleOptions\n=============================\n\n @interface GMTCMutableMarkerStyleOptions : ../Classes/GMTCMarkerStyleOptions.html\n\nMutable data object that holds marker's customization properties.\nNote: When applying the style options for a marker with the\n`GMTCCustomizableMarkerTypeTripVehicle` type, you must explicitly\nset the `isFlat` property to YES. Otherwise, when the map is rotated in 3D\nmode, the vehicle heading won't be aligned with the rotated direction.\n- `\n ``\n ``\n `\n\n ### [groundAnchor](#/c:objc(cs)GMTCMutableMarkerStyleOptions(py)groundAnchor)\n\n `\n ` \n The ground anchor for the marker. Defaults to {0.5f, 0.5f} \n\n #### Declaration\n\n Swift \n\n var groundAnchor: CGPoint { get set }\n\n Objective-C \n\n @property (nonatomic) CGPoint groundAnchor;\n\n- `\n ``\n ``\n `\n\n ### [isVisible](#/c:objc(cs)GMTCMutableMarkerStyleOptions(py)isVisible)\n\n `\n ` \n Boolean that determines the visibility of the marker. Defaults to YES. \n\n #### Declaration\n\n Swift \n\n var isVisible: Bool { get set }\n\n Objective-C \n\n @property (nonatomic) BOOL isVisible;\n\n- `\n ``\n ``\n `\n\n ### [iconView](#/c:objc(cs)GMTCMutableMarkerStyleOptions(py)iconView)\n\n `\n ` \n Marker view to render. If left nil, defaults to the icon property value. \n\n #### Declaration\n\n Swift \n\n var iconView: UIView? { get set }\n\n Objective-C \n\n @property (nonatomic, nullable) UIView *iconView;\n\n- `\n ``\n ``\n `\n\n ### [icon](#/c:objc(cs)GMTCMutableMarkerStyleOptions(py)icon)\n\n `\n ` \n The icon to display for the marker. If there is no iconView, and icon is left nil,\n the marker's default icon is used. \n\n #### Declaration\n\n Swift \n\n var icon: UIImage? { get set }\n\n Objective-C \n\n @property (nonatomic, nullable) UIImage *icon;\n\n- `\n ``\n ``\n `\n\n ### [zIndex](#/c:objc(cs)GMTCMutableMarkerStyleOptions(py)zIndex)\n\n `\n ` \n The z-index specifies the stack order of this marker. Defaults to 0. \n\n #### Declaration\n\n Swift \n\n var zIndex: Int32 { get set }\n\n Objective-C \n\n @property (nonatomic) int32_t zIndex;\n\n- `\n ``\n ``\n `\n\n ### [isFlat](#/c:objc(cs)GMTCMutableMarkerStyleOptions(py)isFlat)\n\n `\n ` \n Whether the marker is flat against the map or a billboard facing the camera. Defaults to NO. \n\n #### Declaration\n\n Swift \n\n var isFlat: Bool { get set }\n\n Objective-C \n\n @property (nonatomic) BOOL isFlat;"]]