GoogleNavigation Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSStyleSpansOffset
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
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMSStyleSpansOffset\u003c/code\u003e is a function used to apply styles to a path based on specified lengths and an initial offset.\u003c/p\u003e\n"],["\u003cp\u003eIt builds upon the \u003ccode\u003eGMSStyleSpans\u003c/code\u003e function by introducing a \u003ccode\u003elengthOffset\u003c/code\u003e parameter that determines the starting point for applying styles along the path.\u003c/p\u003e\n"],["\u003cp\u003eThis function is useful for customizing the appearance of paths by applying different styles (like colors or line patterns) to specific segments.\u003c/p\u003e\n"]]],["`GMSStyleSpansOffset` is a function that generates styled spans along a path, similar to `GMSStyleSpans`. It accepts a path, an array of styles, an array of lengths, a length kind, and a `lengthOffset`. The key action is to skip an initial length defined by `lengthOffset` from the provided `lengths` array when applying styles. This allows for a specified portion of the path to be excluded from the styling based on a given offset.\n"],null,["# GoogleNavigation Framework Reference\n\nGMSStyleSpansOffset\n===================\n\n extern NSArray\u003c../Classes/GMSStyleSpan.html *\u003e *_Nonnull GMSStyleSpansOffset(\n ../Classes/GMSPath.html *_Nonnull path, NSArray\u003c../Classes/GMSStrokeStyle.html *\u003e *_Nonnull styles,\n NSArray\u003cNSNumber *\u003e *_Nonnull lengths, ../Enums/GMSLengthKind.html lengthKind,\n double lengthOffset)\n\nSimilar to GMSStyleSpans(path, styles, lengths, lengthKind) but additionally takes an initial\nlength offset that will be skipped over relative to the `lengths` array.\n\n`lengthOffset` the length (e.g. in meters) that should be skipped initially from `lengths`."]]