GoogleRidesharingConsumer Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMTSSpeedReadingSpan
A data object that holds the traffic conditions for a contiguous segment of a polyline.
-
The traffic conditions for this segment.
Declaration
Objective-C
@property (nonatomic, readonly) GMTSSpeedType speedType;
-
The starting index (inclusive) for this interval of the routePath array of the owning
GMTSTrafficData
object.
Declaration
Swift
var startIndex: Int32 { get }
Objective-C
@property (nonatomic, readonly) int32_t startIndex;
-
The ending index for this interval of the routePath array of the owning GMTSTrafficData
object.
The index is exclusive; the implied points on the polyline between the previous index and this
index are included in the interval, but the point specified by the index is not included.
Declaration
Swift
var endIndex: Int32 { get }
Objective-C
@property (nonatomic, readonly) int32_t endIndex;
-
Initializes the GMTSSpeedReadingSpan
object by passing the speed interval attributes.
Declaration
Swift
init(speedType: GMTSSpeedType, start startIndex: Int32, end endIndex: Int32)
Objective-C
- (nonnull instancetype)initWithSpeedType:(GMTSSpeedType)speedType
startIndex:(int32_t)startIndex
endIndex:(int32_t)endIndex;
Parameters
speedType
|
The speed type for a segment of a polyline path.
|
startIndex
|
The start index for a segment of the routePath array of the owning
GMTSTrafficData object.
|
endIndex
|
The end index for a segment of the routePath array of the owning
GMTSTrafficData object.
|
-
Use -initWithSpeedType:startIndex:endIndex
instead.
Declaration
Objective-C
- (null_unspecified instancetype)init;
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\u003eGMTSSpeedReadingSpan is a data object representing traffic conditions for a continuous segment of a polyline.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003espeedType\u003c/code\u003e property indicates the traffic conditions for the segment, as defined by a related enum.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003estartIndex\u003c/code\u003e and \u003ccode\u003eendIndex\u003c/code\u003e properties specify the inclusive starting and exclusive ending indices, respectively, of the segment within the routePath array of a GMTSTrafficData object.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003einitWithSpeedType:startIndex:endIndex:\u003c/code\u003e method is used to initialize a GMTSSpeedReadingSpan object with the appropriate attributes, while the \u003ccode\u003einit\u003c/code\u003e method is unavailable.\u003c/p\u003e\n"]]],["`GMTSSpeedReadingSpan` stores traffic conditions for a polyline segment. It defines `speedType`, traffic conditions for the segment, `startIndex`, the segment's starting index in the routePath array, and `endIndex`, the segment's exclusive ending index. It's initialized using `-initWithSpeedType:startIndex:endIndex:` with parameters for speed type, start index, and end index. The basic initialization (`-init`) is unavailable, directing users to use `-initWithSpeedType:startIndex:endIndex:` instead.\n"],null,["# GoogleRidesharingConsumer Framework Reference\n\nGMTSSpeedReadingSpan\n====================\n\n @interface GMTSSpeedReadingSpan : ../Classes/GMTCImmutableData.html\n\nA data object that holds the traffic conditions for a contiguous segment of a polyline.\n- `\n ``\n ``\n `\n\n ### [speedType](#/c:objc(cs)GMTSSpeedReadingSpan(py)speedType)\n\n `\n ` \n The traffic conditions for this segment. \n\n #### Declaration\n\n Swift \n\n var speedType: ../Enums/GMTSSpeedType.html { get }\n\n Objective-C \n\n @property (nonatomic, readonly) ../Enums/GMTSSpeedType.html speedType;\n\n- `\n ``\n ``\n `\n\n ### [startIndex](#/c:objc(cs)GMTSSpeedReadingSpan(py)startIndex)\n\n `\n ` \n The starting index (inclusive) for this interval of the routePath array of the owning\n [GMTSTrafficData](../Classes/GMTSTrafficData.html) object. \n\n #### Declaration\n\n Swift \n\n var startIndex: Int32 { get }\n\n Objective-C \n\n @property (nonatomic, readonly) int32_t startIndex;\n\n- `\n ``\n ``\n `\n\n ### [endIndex](#/c:objc(cs)GMTSSpeedReadingSpan(py)endIndex)\n\n `\n ` \n The ending index for this interval of the routePath array of the owning [GMTSTrafficData](../Classes/GMTSTrafficData.html) object.\n The index is exclusive; the implied points on the polyline between the previous index and this\n index are included in the interval, but the point specified by the index is not included. \n\n #### Declaration\n\n Swift \n\n var endIndex: Int32 { get }\n\n Objective-C \n\n @property (nonatomic, readonly) int32_t endIndex;\n\n- `\n ``\n ``\n `\n\n ### [-initWithSpeedType:startIndex:endIndex:](#/c:objc(cs)GMTSSpeedReadingSpan(im)initWithSpeedType:startIndex:endIndex:)\n\n `\n ` \n Initializes the `GMTSSpeedReadingSpan` object by passing the speed interval attributes. \n\n #### Declaration\n\n Swift \n\n init(speedType: ../Enums/GMTSSpeedType.html, start startIndex: Int32, end endIndex: Int32)\n\n Objective-C \n\n - (nonnull instancetype)initWithSpeedType:(../Enums/GMTSSpeedType.html)speedType\n startIndex:(int32_t)startIndex\n endIndex:(int32_t)endIndex;\n\n #### Parameters\n\n |--------------------|-------------------------------------------------------------------------------------------------------------------------------|\n | ` `*speedType*` ` | The speed type for a segment of a polyline path. |\n | ` `*startIndex*` ` | The start index for a segment of the routePath array of the owning [GMTSTrafficData](../Classes/GMTSTrafficData.html) object. |\n | ` `*endIndex*` ` | The end index for a segment of the routePath array of the owning [GMTSTrafficData](../Classes/GMTSTrafficData.html) object. |\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)GMTSSpeedReadingSpan(im)init)\n\n `\n ` \n Unavailable \n Use `-initWithSpeedType:startIndex:endIndex` instead. \n\n #### Declaration\n\n Objective-C \n\n - (null_unspecified instancetype)init;"]]