GoogleRidesharingConsumer Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMTCMarkerStyleOptions
Data object that holds custom marker properties from the client application.
-
The ground anchor for the marker. Defaults to {0.5f, 0.5f}
Declaration
Swift
var groundAnchor: CGPoint { get }
Objective-C
@property (nonatomic, readonly) CGPoint groundAnchor;
-
Boolean that determines the visibility of the marker. Defaults to YES.
Declaration
Swift
var isVisible: Bool { get }
Objective-C
@property (nonatomic, readonly) BOOL isVisible;
-
Marker view to render. If left nil, falls back to the icon property instead.
Declaration
Swift
var iconView: UIView? { get }
Objective-C
@property (nonatomic, readonly, nullable) UIView *iconView;
-
The icon to display for the marker.
Declaration
Swift
var icon: UIImage? { get }
Objective-C
@property (nonatomic, readonly, nullable) UIImage *icon;
-
The z-index specifies the stack order of this marker. Defaults to 0.
Declaration
Swift
var zIndex: Int32 { get }
Objective-C
@property (nonatomic, readonly) 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 }
Objective-C
@property (nonatomic, readonly) BOOL isFlat;
-
Initializes the object with default values: groundAnchor:{0.5f, 0.5f}
, isVisible:YES
,
iconView:nil
, icon:nil
, zIndex:0
, isFlat:NO
.
Declaration
Objective-C
- (nonnull instancetype)init;
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\u003eGMTCMarkerStyleOptions is a data object that stores custom marker properties, extending \u003ccode\u003eGMTCImmutableData\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egroundAnchor\u003c/code\u003e property determines the marker's anchor point, defaulting to {0.5f, 0.5f}.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eisVisible\u003c/code\u003e property controls the marker's visibility, defaulting to YES.\u003c/p\u003e\n"],["\u003cp\u003eMarkers can be rendered with either an \u003ccode\u003eiconView\u003c/code\u003e (UIView) or an \u003ccode\u003eicon\u003c/code\u003e (UIImage), with \u003ccode\u003eiconView\u003c/code\u003e taking precedence.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ezIndex\u003c/code\u003e property manages the stacking order of the marker, defaulting to 0, and \u003ccode\u003eisFlat\u003c/code\u003e determines if the marker is flat or a billboard, defaulting to NO.\u003c/p\u003e\n"]]],["GMTCMarkerStyleOptions is a data object storing custom marker properties. It provides options to define: `groundAnchor` (default: {0.5f, 0.5f}), `isVisible` (default: YES), `iconView` (falls back to `icon`), `icon`, `zIndex` (default: 0), and `isFlat` (default: NO). An initializer is provided to set these properties to their default values. It's possible to set the object properties in either swift or objective-c.\n"],null,["# GoogleRidesharingConsumer Framework Reference\n\nGMTCMarkerStyleOptions\n======================\n\n @interface GMTCMarkerStyleOptions\n : ../Classes/GMTCImmutableData.html \u003cNSCopying, NSMutableCopying\u003e\n\nData object that holds custom marker properties from the client application.\n- `\n ``\n ``\n `\n\n ### [groundAnchor](#/c:objc(cs)GMTCMarkerStyleOptions(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 }\n\n Objective-C \n\n @property (nonatomic, readonly) CGPoint groundAnchor;\n\n- `\n ``\n ``\n `\n\n ### [isVisible](#/c:objc(cs)GMTCMarkerStyleOptions(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 }\n\n Objective-C \n\n @property (nonatomic, readonly) BOOL isVisible;\n\n- `\n ``\n ``\n `\n\n ### [iconView](#/c:objc(cs)GMTCMarkerStyleOptions(py)iconView)\n\n `\n ` \n Marker view to render. If left nil, falls back to the icon property instead. \n\n #### Declaration\n\n Swift \n\n var iconView: UIView? { get }\n\n Objective-C \n\n @property (nonatomic, readonly, nullable) UIView *iconView;\n\n- `\n ``\n ``\n `\n\n ### [icon](#/c:objc(cs)GMTCMarkerStyleOptions(py)icon)\n\n `\n ` \n The icon to display for the marker. \n\n #### Declaration\n\n Swift \n\n var icon: UIImage? { get }\n\n Objective-C \n\n @property (nonatomic, readonly, nullable) UIImage *icon;\n\n- `\n ``\n ``\n `\n\n ### [zIndex](#/c:objc(cs)GMTCMarkerStyleOptions(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 }\n\n Objective-C \n\n @property (nonatomic, readonly) int32_t zIndex;\n\n- `\n ``\n ``\n `\n\n ### [isFlat](#/c:objc(cs)GMTCMarkerStyleOptions(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 }\n\n Objective-C \n\n @property (nonatomic, readonly) BOOL isFlat;\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)GMTCMarkerStyleOptions(im)init)\n\n `\n ` \n Initializes the object with default values: `groundAnchor:{0.5f, 0.5f}`, `isVisible:YES`,\n `iconView:nil`, `icon:nil`, `zIndex:0`, `isFlat:NO`. \n\n #### Declaration\n\n Swift \n\n init()\n\n Objective-C \n\n - (nonnull instancetype)init;"]]