GMTSTrafficData
@interface GMTSTrafficData : GMTCImmutableDataAn 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
Swift
var routePath: [GMTSLatLng] { get }Objective-C
@property (nonatomic, readonly) NSArray<GMTSLatLng *> *_Nonnull routePath; -
The array of
GMTSSpeedReadingSpansobjects for a segment of the polyline path.Declaration
Swift
var speedReadingSpans: [GMTSSpeedReadingSpan] { get }Objective-C
@property (nonatomic, readonly) NSArray<GMTSSpeedReadingSpan *> *_Nonnull speedReadingSpans; -
Initializes the object by passing the traffic data attributes.
Declaration
Swift
init(routePath: [GMTSLatLng], speedReadingSpans: [GMTSSpeedReadingSpan])Objective-C
- (nonnull instancetype) initWithRoutePath:(nonnull NSArray<GMTSLatLng *> *)routePath speedReadingSpans: (nonnull NSArray<GMTSSpeedReadingSpan *> *)speedReadingSpans;Parameters
routePathThe list of LatLngs that make up the route.
speedReadingSpansThe array of
GMTSSpeedReadingSpansobjects for the route. -
Unavailable
Use
-initWithRoutePath:speedReadingSpansinstead.Declaration
Objective-C
- (nonnull instancetype)init;