# GoogleMaps Framework Reference

# GMSStyleSpans

    extern NSArray<https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSStyleSpan.html *> *_Nonnull GMSStyleSpans(
        https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPath.html *_Nonnull path, NSArray<https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSStrokeStyle.html *> *_Nonnull styles,
        NSArray<NSNumber *> *_Nonnull lengths, https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Enums/GMSLengthKind.html lengthKind)

Returns an `NSArray` of `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSStyleSpan.html` constructed by repeated application of style and length
information from `styles` and `lengths` along `path`.

`path` the path along which the output spans are computed.
`styles` an `NSArray` of GMSStrokeStyle. Wraps if consumed. Can't be empty.
`lengths` an `NSArray` of NSNumber; each entry gives the length of the corresponding
style from `styles`. Wraps if consumed. Can't be empty.
`lengthKind` the interpretation of values from `lengths` (geodesic, rhumb or projected).

Example: a polyline with alternating black and white spans:

<br />

     https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSMutablePath.html *path;
     NSArray *styles = @[[https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSStrokeStyle.html solidColor:[UIColor whiteColor]],
                         [https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSStrokeStyle.html solidColor:[UIColor blackColor]]];
     NSArray *lengths = @[@100000, @50000];
     polyline.path = path;
     polyline.spans = GMSStyleSpans(path, styles, lengths, kGMSLengthRhumb);
     
<br />