GoogleNavigation Framework Reference
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 2024-11-15 UTC.
[null,null,["Last updated 2024-11-15 UTC."],[[["`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` 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"]]