GoogleNavigation Framework Reference

  • GMSStyleSpansOffset is a function used to apply styles to a path based on specified lengths and an initial offset.

  • It builds upon the GMSStyleSpans function by introducing a lengthOffset parameter that determines the starting point for applying styles along the path.

  • This function is useful for customizing the appearance of paths by applying different styles (like colors or line patterns) to specific segments.

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.