AI-generated Key Takeaways
-
GMSStrokeStyledefines the visual appearance of lines or strokes on a map, such as polylines. -
It supports solid colors, gradients, and repeating image patterns (stamps) for styling.
-
Strokes can be made transparent while still displaying a stamp pattern.
-
Developers can create
GMSStrokeStyleinstances using convenience methods for solid colors, gradients, or stamps.
GMSStrokeStyle
@interface
GMSStrokeStyle
:
NSObject
Describes the drawing style for one-dimensional entities such as polylines.
-
A repeated image over the stroke to allow a user to set a 2D texture on top of a stroke. If the image has transparent or semi-transparent portions, the underlying stroke color will show through in those places. Solid portions of the stamp will completely cover the base stroke.
Declaration
Swift
var stampStyle : GMSStampStyle ? { get set }Objective-C
@property ( nonatomic , strong , nullable ) GMSStampStyle * stampStyle ; -
Creates a solid color stroke style.
Declaration
Swift
class func solidColor ( _ color : UIColor ) -> SelfObjective-C
+ ( nonnull instancetype ) solidColor :( nonnull UIColor * ) color ; -
Creates a gradient stroke style interpolating from
fromColortotoColor.Declaration
Swift
class func gradient ( from fromColor : UIColor , to toColor : UIColor ) -> SelfObjective-C
+ ( nonnull instancetype ) gradientFromColor :( nonnull UIColor * ) fromColor toColor :( nonnull UIColor * ) toColor ; -
Creates a transparent stroke style and sets the stampStyle.
Declaration
Swift
class func transparentStroke ( withStamp stampStyle : GMSStampStyle ) -> SelfObjective-C
+ ( nonnull instancetype ) transparentStrokeWithStampStyle : ( nonnull GMSStampStyle * ) stampStyle ;

