AI-generated Key Takeaways
- 
          
GMSStrokeStyledefines the visual appearance of lines or strokes on a map, such as those used for polylines. - 
          
It supports solid colors, gradients, and repeating image patterns (stamps) to style strokes.
 - 
          
You can create styles with solid colors using
solidColor:, gradients usinggradientFromColor:toColor:, and transparent strokes with stamps usingtransparentStrokeWithStampStyle:. - 
          
The
stampStyleproperty allows applying a repeating image pattern over the stroke, with transparency allowing the underlying stroke color to show through. 
GMSStrokeStyle
@interface GMSStrokeStyle : NSObjectDescribes 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;