GoogleRidesharingConsumer Framework Reference

GMTSVehicleLocation

@interface GMTSVehicleLocation : GMTCImmutableData

Object that contains the location information for the vehicle that describes the heading, speed, and time when this information was retrieved.

  • Location of the vehicle.

    Declaration

    Swift

    var latLng: GMTSLatLng? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) GMTSLatLng *latLng;
  • The radius of uncertainty for latLng, measured in meters. The latLng indicates the center of the circle, and latLngAccuracy indicates the radius of that circle.

    Declaration

    Swift

    var latLngAccuracy: Double { get }

    Objective-C

    @property (nonatomic, readonly) double latLngAccuracy;
  • Heading corner radius of the vehicle.

    Declaration

    Swift

    var heading: CLLocationDirection { get }

    Objective-C

    @property (nonatomic, readonly) CLLocationDirection heading;
  • The radius of uncertainty for heading, measured in degrees. The heading identifies the mean of the heading estimate and this value indicates the standard deviation of the estimate.

    Declaration

    Swift

    var headingAccuracy: Double { get }

    Objective-C

    @property (nonatomic, readonly) double headingAccuracy;
  • Speed of the vehicle.

    Declaration

    Swift

    var speed: Int32 { get }

    Objective-C

    @property (nonatomic, readonly) int32_t speed;
  • Accuracy of speed in meters per second.

    Declaration

    Swift

    var speedAccuracy: Double { get }

    Objective-C

    @property (nonatomic, readonly) double speedAccuracy;
  • The timestamp of the update time.

    Declaration

    Swift

    var updateTime: TimeInterval { get }

    Objective-C

    @property (nonatomic, readonly) NSTimeInterval updateTime;
  • Indicates whether the vehicle can be snapped to the route.

    Declaration

    Swift

    var isSnappableToRoute: Bool { get }

    Objective-C

    @property (nonatomic, readonly) BOOL isSnappableToRoute;
  • The timestamp in milliseconds when Fleet Engine received the updated location from the Driver app. You can use this to determine if the “Driver” is “Connected”. By comparing this timestamp with the current time in the device, you can determine how long ago the driver location was reported to Fleet Engine. A negative value indicates that this value is not valid (it is absent).

    Declaration

    Swift

    var updateServerTime: TimeInterval { get }

    Objective-C

    @property (nonatomic, readonly) NSTimeInterval updateServerTime;
  • Deprecated

    Use -initWithOptions instead.

    Designated initialization.

    Declaration

    Swift

    convenience init(latLng: GMTSLatLng?, latLngAccuracy: Double, heading: CLLocationDirection, headingAccuracy: Double, speed: Int32, speedAccuracy: Double, updateTime: TimeInterval, isSnappableToRoute: Bool)

    Objective-C

    - (nonnull instancetype)initWithLatLng:(nullable GMTSLatLng *)latLng
                            latLngAccuracy:(double)latLngAccuracy
                                   heading:(CLLocationDirection)heading
                           headingAccuracy:(double)headingAccuracy
                                     speed:(int32_t)speed
                             speedAccuracy:(double)speedAccuracy
                                updateTime:(NSTimeInterval)updateTime
                        isSnappableToRoute:(BOOL)isSnappableToRoute;

    Parameters

    latLng

    The location of the vehicle.

    latLngAccuracy

    The location accuracy of the vehicle.

    heading

    The heading corner radius of the vehicle.

    headingAccuracy

    The heading accuracy of the vehicle.

    speed

    The speed of the vehicle.

    speedAccuracy

    The speed accuracy of the vehicle.

    updateTime

    The timestamp of the update time.

    isSnappableToRoute

    Indicates whether the vehicle can be snapped to the route.

  • Designated initialization.

    Declaration

    Swift

    init(options: GMTSVehicleLocationOptions)

    Objective-C

    - (nonnull instancetype)initWithOptions:
        (nonnull GMTSVehicleLocationOptions *)options;

    Parameters

    options

    The options for the vehicle location.

  • Unavailable

    Use initWithOptions: instead.

    Declaration

    Objective-C

    - (nonnull instancetype)init;