AI-generated Key Takeaways
- 
          GMSStyleSpandefines the style for a portion of a polyline, like color or pattern.
- 
          It can be initialized with a solid color or a GMSStrokeStylefor more complex styling.
- 
          segmentsproperty indicates the length of the span along the polyline, measured in segments.
- 
          Factory methods like spanWithColor:andspanWithStyle:provide convenient ways to createGMSStyleSpaninstances.
- 
          The styleproperty provides access to theGMSStrokeStyleassociated with the span, allowing for detailed customization.
GMSStyleSpan
@interface GMSStyleSpan : NSObjectDescribes the style for some region of a polyline.
- 
                  
                  Factory returning a solid color span of length one segment. Equivalent to [GMSStyleSpan spanWithStyle:[GMSStrokeStyle solidColor:color] segments:1].DeclarationSwift convenience init(color: UIColor)Objective-C + (nonnull instancetype)spanWithColor:(nonnull UIColor *)color;
- 
                  
                  Factory returning a solid color span with a given number of segments. Equivalent to [GMSStyleSpan spanWithStyle:[GMSStrokeStyle solidColor:color] segments:segments].DeclarationSwift convenience init(color: UIColor, segments: Double)Objective-C + (nonnull instancetype)spanWithColor:(nonnull UIColor *)color segments:(double)segments;
- 
                  
                  Factory returning a span with the given styleof length one segment. Equivalent to[GMSStyleSpan spanWithStyle:style segments:1].DeclarationSwift convenience init(style: GMSStrokeStyle)Objective-C + (nonnull instancetype)spanWithStyle:(nonnull GMSStrokeStyle *)style;
- 
                  
                  Factory returning a span with the given styleand length in number of segments.segmentsmust be greater than 0 (i.e. can’t be 0).DeclarationSwift convenience init(style: GMSStrokeStyle, segments: Double)Objective-C + (nonnull instancetype)spanWithStyle:(nonnull GMSStrokeStyle *)style segments:(double)segments;
- 
                  
                  The style of this span. DeclarationSwift var style: GMSStrokeStyle { get }Objective-C @property (nonatomic, readonly) GMSStrokeStyle *_Nonnull style;
- 
                  
                  The length of this span in number of segments. DeclarationSwift var segments: Double { get }Objective-C @property (nonatomic, readonly) double segments;