AI-generated Key Takeaways
-
GMTCMutableMarkerStyleOptionsis a mutable data object used to customize the properties of a marker. -
The
groundAnchorproperty defines the marker's anchor point, defaulting to the center at {0.5f, 0.5f}. -
Markers can be made visible or hidden using the
isVisibleproperty, which defaults to YES. -
Markers can use a custom view via
iconView, or an image with theiconproperty, otherwise it uses the default icon. -
The
zIndexproperty determines the marker's stacking order, defaulting to 0, andisFlatdetermines if it is flat against the map or a billboard facing the camera, which defaults to NO.
GMTCMutableMarkerStyleOptions
@interface GMTCMutableMarkerStyleOptions : GMTCMarkerStyleOptionsMutable 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;