GoogleRidesharingConsumer Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMTSTrafficData
An object that holds the traffic data for a stretch of road.
-
The array of LatLngs that make the polyline representing the path for a stretch of data. Note
that this path may vary subtly from the path for the route. For example, there might be
additional points needed where speed types change.
Declaration
Objective-C
@property (nonatomic, readonly) NSArray<GMTSLatLng *> *_Nonnull routePath;
-
The array of GMTSSpeedReadingSpans
objects for a segment of the polyline path.
Declaration
Objective-C
@property (nonatomic, readonly) NSArray<GMTSSpeedReadingSpan *> *_Nonnull speedReadingSpans;
-
Initializes the object by passing the traffic data attributes.
Declaration
Objective-C
- (nonnull instancetype)
initWithRoutePath:(nonnull NSArray<GMTSLatLng *> *)routePath
speedReadingSpans:
(nonnull NSArray<GMTSSpeedReadingSpan *> *)speedReadingSpans;
Parameters
routePath
|
The list of LatLngs that make up the route.
|
speedReadingSpans
|
The array of GMTSSpeedReadingSpans objects for the route.
|
-
Use -initWithRoutePath:speedReadingSpans
instead.
Declaration
Objective-C
- (nonnull 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-01-21 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-21 UTC."],[[["`GMTSTrafficData` is an object that contains traffic data for a road segment."],["The `routePath` property provides an array of LatLngs representing the polyline path of the traffic data, which may slightly differ from the actual route path."],["The `speedReadingSpans` property provides an array of `GMTSSpeedReadingSpan` objects that describe speed information for the polyline path."],["The designated initializer is `-initWithRoutePath:speedReadingSpans:`, which takes an array of LatLngs and an array of speed reading spans to initialize the traffic data object."],["The `-init` method is unavailable, and you should use the `-initWithRoutePath:speedReadingSpans` method instead."]]],["`GMTSTrafficData` holds traffic information for a road segment. It contains `routePath`, an array of `LatLngs` defining the polyline path, which may vary slightly from the main route. `speedReadingSpans`, an array of `GMTSSpeedReadingSpans` objects, represents speed data along the path. Initialization requires both `routePath` and `speedReadingSpans`. `Init` method is unavailable, use `-initWithRoutePath:speedReadingSpans` instead.\n"]]