# GoogleRidesharingConsumer Framework Reference

# GMTSTripWaypoint

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

Object that describes a vehicle stop on its route.
For a trip with multiple passengers,
this point might be an intermediate stop or the end of a trip.
- `


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


  ` The location associated with the 'tripWaypoint'.

  #### Declaration

  Swift

      var location: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSTerminalLocation.html? { get }

  Objective-C

      @property (nonatomic, readonly, nullable) https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSTerminalLocation.html *location;

- `


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


  ` The trip ID associated with the waypoint.

  #### Declaration

  Swift

      var tripID: String? { get }

  Objective-C

      @property (nonatomic, readonly, nullable) https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Type-Definitions/GMTCFleetEngineIDString.html *tripID;

- `


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


  ` The type of the trip waypoint.

  #### Declaration

  Swift

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

  Objective-C

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

- `


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


  ` The path distance calculated by the Fleet Engine from the previous waypoint on a path to
  the current waypoint.

  #### Declaration

  Swift

      var distanceToPreviousWaypointInMeters: Int32 { get }

  Objective-C

      @property (nonatomic, readonly) int32_t distanceToPreviousWaypointInMeters;

- `


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


  ` The estimated time of arrival to this waypoint.

  #### Declaration

  Swift

      var eta: TimeInterval { get }

  Objective-C

      @property (nonatomic, readonly) NSTimeInterval ETA;

- `


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


  ` The path calculated by the server from the previous waypoint
  to the current waypoint encoded as an array of LatLng.

  #### Declaration

  Swift

      var routeFromPreviousWaypoint: [https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSLatLng.html]? { get }

  Objective-C

      @property (nonatomic, readonly, nullable) NSArray<https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSLatLng.html *> *routeFromPreviousWaypoint;

- `


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


  ` The traffic data for the path leading to this waypoint.

  #### Declaration

  Swift

      var trafficData: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSTrafficData.html? { get }

  Objective-C

      @property (nonatomic, readonly, nullable) https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSTrafficData.html *trafficData;

- `


  ### [-initWithLocation:tripID:waypointType:distanceToPreviousWaypointInMeters:ETA:](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSTripWaypoint#/c:objc(cs)GMTSTripWaypoint(im)initWithLocation:tripID:waypointType:distanceToPreviousWaypointInMeters:ETA:)


  ` Instantiates the object.

  #### Declaration

  Swift

      init(location: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSTerminalLocation.html?, tripID: String?, waypointType: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSTripWaypointType.html, distanceToPreviousWaypointInMeters: Int32, eta https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSTripWaypoint.html#/c:objc(cs)GMTSTripWaypoint(py)ETA: TimeInterval)

  Objective-C

      - (nonnull instancetype)initWithLocation:
                                  (nullable https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSTerminalLocation.html *)location
                                        tripID:
                                            (nullable https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Type-Definitions/GMTCFleetEngineIDString.html *)tripID
                                  waypointType:(https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSTripWaypointType.html)waypointType
            distanceToPreviousWaypointInMeters:
                (int32_t)distanceToPreviousWaypointInMeters
                                           ETA:(NSTimeInterval)ETA;

  #### Parameters

  |---|---|
  | ` location ` | The latitude and longitude associated with the waypoint. |
  | ` tripID ` | The ID of the trip which associated with the waypoint. |
  | ` waypointType ` | The type of terminal associated with the waypoint. |
  | ` distanceToPreviousWaypointInMeters ` | The path distance calculated by Fleet Engine from the previous waypoint to the current waypoint. |
  | ` ETA ` | The estimated time of arrival to the waypoint. |

- `


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


  ` Unavailable
  Use `-initWithLocation:tripID:waypointType:distanceMeters:eta:` instead.

  #### Declaration

  Objective-C

      - (null_unspecified instancetype)init;