GoogleMaps Framework Reference

  • GMSStyleSpansOffset creates an array of style spans for a given path, similar to GMSStyleSpans.

  • It allows specifying an initial length offset, effectively skipping a portion of the path before applying styles based on the provided lengths.

  • This function is useful for customizing the styling of specific segments of a path by controlling the starting point of style applications.

GMSStyleSpansOffset

extern NSArray<GMSStyleSpan *> *_Nonnull GMSStyleSpansOffset(
    GMSPath *_Nonnull path, NSArray<GMSStrokeStyle *> *_Nonnull styles,
    NSArray<NSNumber *> *_Nonnull lengths, GMSLengthKind lengthKind,
    double lengthOffset)

Similar to GMSStyleSpans(path, styles, lengths, lengthKind) but additionally takes an initial length offset that will be skipped over relative to the lengths array.

lengthOffset the length (e.g. in meters) that should be skipped initially from lengths.