# GoogleRidesharingConsumer Framework Reference

# GMTSVehicleLocation

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

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


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


  ` Location of the vehicle.

  #### Declaration

  Swift

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

  Objective-C

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

- `


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


  ` The radius of uncertainty for `https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleLocation.html#/c:objc(cs)GMTSVehicleLocation(py)latLng`, measured in meters. The
  `https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleLocation.html#/c:objc(cs)GMTSVehicleLocation(py)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](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleLocation#/c:objc(cs)GMTSVehicleLocation(py)heading)


  ` Heading corner radius of the vehicle.

  #### Declaration

  Swift

      var heading: CLLocationDirection { get }

  Objective-C

      @property (nonatomic, readonly) CLLocationDirection heading;

- `


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


  ` The radius of uncertainty for `https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleLocation.html#/c:objc(cs)GMTSVehicleLocation(py)heading`, measured in degrees. The `https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleLocation.html#/c:objc(cs)GMTSVehicleLocation(py)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](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleLocation#/c:objc(cs)GMTSVehicleLocation(py)speed)


  ` Speed of the vehicle.

  #### Declaration

  Swift

      var speed: Int32 { get }

  Objective-C

      @property (nonatomic, readonly) int32_t speed;

- `


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


  ` Accuracy of speed in meters per second.

  #### Declaration

  Swift

      var speedAccuracy: Double { get }

  Objective-C

      @property (nonatomic, readonly) double speedAccuracy;

- `


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


  ` The timestamp of the update time.

  #### Declaration

  Swift

      var updateTime: TimeInterval { get }

  Objective-C

      @property (nonatomic, readonly) NSTimeInterval updateTime;

- `


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


  ` Indicates whether the vehicle can be snapped to the route.

  #### Declaration

  Swift

      var isSnappableToRoute: Bool { get }

  Objective-C

      @property (nonatomic, readonly) BOOL isSnappableToRoute;

- `


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


  ` 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;

- `


  ### [-initWithLatLng:latLngAccuracy:heading:headingAccuracy:speed:speedAccuracy:updateTime:isSnappableToRoute:](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleLocation#/c:objc(cs)GMTSVehicleLocation(im)initWithLatLng:latLngAccuracy:heading:headingAccuracy:speed:speedAccuracy:updateTime:isSnappableToRoute:)


  ` Deprecated

  Use `-initWithOptions` instead.
  Designated initialization.

  #### Declaration

  Swift

      convenience init(latLng: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSLatLng.html?, latLngAccuracy: Double, heading: CLLocationDirection, headingAccuracy: Double, speed: Int32, speedAccuracy: Double, updateTime: TimeInterval, isSnappableToRoute: Bool)

  Objective-C

      - (nonnull instancetype)initWithLatLng:(nullable https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSLatLng.html *)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. |

- `


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


  ` Designated initialization.

  #### Declaration

  Swift

      init(options: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleLocationOptions.html)

  Objective-C

      - (nonnull instancetype)initWithOptions:
          (nonnull https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleLocationOptions.html *)options;

  #### Parameters

  |---|---|
  | ` options ` | The options for the vehicle location. |

- `


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


  ` Unavailable
  Use `initWithOptions:` instead.

  #### Declaration

  Objective-C

      - (nonnull instancetype)init;