On-demand Rides and Deliveries Solution is currently available only to select partners. Contact sales to learn more.

GMTSTrafficData Class Reference

GMTSTrafficData Class Reference

Overview

An object that holds the traffic data for a stretch of road.

Inherits GMTSImmutableData.

Public Member Functions

(instancetype) - initWithRoutePath:speedReadingSpans:
 Initializes the object by passing the traffic data attributes.

Properties

NSArray< GMTSLatLng * > * routePath
 The array of LatLngs that make the polyline representing the path for a stretch of data.
NSArray< GMTSSpeedReadingSpan * > * speedReadingSpans
 The array of GMTSSpeedReadingSpans objects for a segment of the polyline path.

Member Function Documentation

- (instancetype) initWithRoutePath: (NSArray< GMTSLatLng * > *)  routePath
speedReadingSpans: (NSArray< GMTSSpeedReadingSpan * > *)  speedReadingSpans 

Initializes the object by passing the traffic data attributes.

Parameters:
routePathThe list of LatLngs that make up the route.
speedReadingSpansThe array of GMTSSpeedReadingSpans objects for the route.

Property Documentation

- (NSArray<GMTSLatLng *>*) routePath [read, assign]

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.

- (NSArray<GMTSSpeedReadingSpan *>*) speedReadingSpans [read, assign]

The array of GMTSSpeedReadingSpans objects for a segment of the polyline path.