# GoogleRidesharingConsumer Framework Reference

# GMTSSpeedReadingSpan

    @interface GMTSSpeedReadingSpan : https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCImmutableData.html

A data object that holds the traffic conditions for a contiguous segment of a polyline.
- `


  ### [speedType](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSSpeedReadingSpan#/c:objc(cs)GMTSSpeedReadingSpan(py)speedType)


  ` The traffic conditions for this segment.

  #### Declaration

  Swift

      var speedType: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSSpeedType.html { get }

  Objective-C

      @property (nonatomic, readonly) https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSSpeedType.html speedType;

- `


  ### [startIndex](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSSpeedReadingSpan#/c:objc(cs)GMTSSpeedReadingSpan(py)startIndex)


  ` The starting index (inclusive) for this interval of the routePath array of the owning
  `https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSTrafficData.html` object.

  #### Declaration

  Swift

      var startIndex: Int32 { get }

  Objective-C

      @property (nonatomic, readonly) int32_t startIndex;

- `


  ### [endIndex](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSSpeedReadingSpan#/c:objc(cs)GMTSSpeedReadingSpan(py)endIndex)


  ` The ending index for this interval of the routePath array of the owning `https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSTrafficData.html` 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;

- `


  ### [-initWithSpeedType:startIndex:endIndex:](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSSpeedReadingSpan#/c:objc(cs)GMTSSpeedReadingSpan(im)initWithSpeedType:startIndex:endIndex:)


  ` Initializes the `GMTSSpeedReadingSpan` object by passing the speed interval attributes.

  #### Declaration

  Swift

      init(speedType: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSSpeedType.html, start startIndex: Int32, end endIndex: Int32)

  Objective-C

      - (nonnull instancetype)initWithSpeedType:(https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSSpeedType.html)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 `https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSTrafficData.html` object. |
  | ` endIndex ` | The end index for a segment of the routePath array of the owning `https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSTrafficData.html` object. |

- `


  ### [-init](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSSpeedReadingSpan#/c:objc(cs)GMTSSpeedReadingSpan(im)init)


  ` Unavailable
  Use `-initWithSpeedType:startIndex:endIndex` instead.

  #### Declaration

  Objective-C

      - (null_unspecified instancetype)init;