GoogleRidesharingConsumer Framework Reference

  • GMTSTripWaypoint describes a vehicle's stop on a route, potentially being an intermediate or final destination for trips with multiple passengers.

  • Each GMTSTripWaypoint includes a location, trip ID, waypoint type, distance from the previous waypoint in meters, and estimated time of arrival (ETA).

  • The object provides details about the route from the previous waypoint, encoded as an array of LatLng, and also provides access to traffic data.

  • You can instantiate a GMTSTripWaypoint using -initWithLocation:tripID:waypointType:distanceToPreviousWaypointInMeters:ETA: and pass it the location, trip ID, waypoint type, distance from previous waypoint and the ETA.

  • The object is immutable, since it's based on GMTCImmutableData, and the default -init function is unavailable, making it mandatory to use the correct constructor.

GMTSTripWaypoint

@interface GMTSTripWaypoint : GMTCImmutableData

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.

  • The location associated with the ‘tripWaypoint’.

    Declaration

    Swift

    var location: GMTSTerminalLocation? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) GMTSTerminalLocation *location;
  • The trip ID associated with the waypoint.

    Declaration

    Swift

    var tripID: String? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) GMTCFleetEngineIDString *tripID;
  • The type of the trip waypoint.

    Declaration

    Swift

    var waypointType: GMTSTripWaypointType { get }

    Objective-C

    @property (nonatomic, readonly) GMTSTripWaypointType waypointType;
  • 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

    The estimated time of arrival to this waypoint.

    Declaration

    Swift

    var eta: TimeInterval { get }

    Objective-C

    @property (nonatomic, readonly) NSTimeInterval ETA;
  • The path calculated by the server from the previous waypoint to the current waypoint encoded as an array of LatLng.

    Declaration

    Swift

    var routeFromPreviousWaypoint: [GMTSLatLng]? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) NSArray<GMTSLatLng *> *routeFromPreviousWaypoint;
  • The traffic data for the path leading to this waypoint.

    Declaration

    Swift

    var trafficData: GMTSTrafficData? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) GMTSTrafficData *trafficData;
  • Instantiates the object.

    Declaration

    Swift

    init(location: GMTSTerminalLocation?, tripID: String?, waypointType: GMTSTripWaypointType, distanceToPreviousWaypointInMeters: Int32, eta ETA: TimeInterval)

    Objective-C

    - (nonnull instancetype)initWithLocation:
                                (nullable GMTSTerminalLocation *)location
                                      tripID:
                                          (nullable GMTCFleetEngineIDString *)tripID
                                waypointType:(GMTSTripWaypointType)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.

  • Unavailable

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

    Declaration

    Objective-C

    - (null_unspecified instancetype)init;