GoogleRidesharingConsumer Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMTSVehicleLocationOptions
@interface GMTSVehicleLocationOptions : NSObject
This class defines initialization-time options for GMTSVehicleLocation
.
-
Declaration
Objective-C
@property (nonatomic, strong, 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 set }
Objective-C
@property (nonatomic) double latLngAccuracy;
-
Heading corner radius of the vehicle.
Declaration
Swift
var heading: CLLocationDirection { get set }
Objective-C
@property (nonatomic) 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 set }
Objective-C
@property (nonatomic) double headingAccuracy;
-
Declaration
Swift
var speed: Int32 { get set }
Objective-C
@property (nonatomic) int32_t speed;
-
Accuracy of speed in meters per second.
Declaration
Swift
var speedAccuracy: Double { get set }
Objective-C
@property (nonatomic) double speedAccuracy;
-
The timestamp in milliseconds when the location was collected by the Driver application (client
side).
Declaration
Swift
var updateTime: TimeInterval { get set }
Objective-C
@property (nonatomic) NSTimeInterval updateTime;
-
Indicates whether the vehicle can be snapped to the route.
Declaration
Swift
var isSnappableToRoute: Bool { get set }
Objective-C
@property (nonatomic) 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 set }
Objective-C
@property (nonatomic) NSTimeInterval updateServerTime;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMTSVehicleLocationOptions\u003c/code\u003e defines the initialization-time options for \u003ccode\u003eGMTSVehicleLocation\u003c/code\u003e, including the vehicle's location, accuracy, heading, and speed.\u003c/p\u003e\n"],["\u003cp\u003eThis class allows setting the location's latitude and longitude (\u003ccode\u003elatLng\u003c/code\u003e) along with its radius of uncertainty (\u003ccode\u003elatLngAccuracy\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eYou can define the vehicle's heading and its corresponding accuracy using \u003ccode\u003eheading\u003c/code\u003e and \u003ccode\u003eheadingAccuracy\u003c/code\u003e, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe class allows setting vehicle speed and its accuracy with \u003ccode\u003espeed\u003c/code\u003e and \u003ccode\u003espeedAccuracy\u003c/code\u003e, as well as tracking location timestamps with \u003ccode\u003eupdateTime\u003c/code\u003e and \u003ccode\u003eupdateServerTime\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eisSnappableToRoute\u003c/code\u003e option indicates whether the vehicle's location can be snapped to the route.\u003c/p\u003e\n"]]],[],null,["# GoogleRidesharingConsumer Framework Reference\n\nGMTSVehicleLocationOptions\n==========================\n\n @interface GMTSVehicleLocationOptions : NSObject\n\nThis class defines initialization-time options for [GMTSVehicleLocation](../Classes/GMTSVehicleLocation.html).\n- `\n ``\n ``\n `\n\n ### [latLng](#/c:objc(cs)GMTSVehicleLocationOptions(py)latLng)\n\n `\n ` \n Location of the vehicle. \n\n #### Declaration\n\n Swift \n\n var latLng: ../Classes/GMTSLatLng.html? { get set }\n\n Objective-C \n\n @property (nonatomic, strong, nullable) ../Classes/GMTSLatLng.html *latLng;\n\n- `\n ``\n ``\n `\n\n ### [latLngAccuracy](#/c:objc(cs)GMTSVehicleLocationOptions(py)latLngAccuracy)\n\n `\n ` \n The radius of uncertainty for \\|latLng\\|, measured in meters. The \\|latLng\\| indicates the center\n of the circle, and \\|latLngAccuracy\\| indicates the radius of that circle. \n\n #### Declaration\n\n Swift \n\n var latLngAccuracy: Double { get set }\n\n Objective-C \n\n @property (nonatomic) double latLngAccuracy;\n\n- `\n ``\n ``\n `\n\n ### [heading](#/c:objc(cs)GMTSVehicleLocationOptions(py)heading)\n\n `\n ` \n Heading corner radius of the vehicle. \n\n #### Declaration\n\n Swift \n\n var heading: CLLocationDirection { get set }\n\n Objective-C \n\n @property (nonatomic) CLLocationDirection heading;\n\n- `\n ``\n ``\n `\n\n ### [headingAccuracy](#/c:objc(cs)GMTSVehicleLocationOptions(py)headingAccuracy)\n\n `\n ` \n The radius of uncertainty for \\|heading\\|, measured in degrees. The \\|heading\\| identifies the mean\n of the heading estimate and this value indicates the standard deviation of the estimate. \n\n #### Declaration\n\n Swift \n\n var headingAccuracy: Double { get set }\n\n Objective-C \n\n @property (nonatomic) double headingAccuracy;\n\n- `\n ``\n ``\n `\n\n ### [speed](#/c:objc(cs)GMTSVehicleLocationOptions(py)speed)\n\n `\n ` \n Speed of the vehicle. \n\n #### Declaration\n\n Swift \n\n var speed: Int32 { get set }\n\n Objective-C \n\n @property (nonatomic) int32_t speed;\n\n- `\n ``\n ``\n `\n\n ### [speedAccuracy](#/c:objc(cs)GMTSVehicleLocationOptions(py)speedAccuracy)\n\n `\n ` \n Accuracy of speed in meters per second. \n\n #### Declaration\n\n Swift \n\n var speedAccuracy: Double { get set }\n\n Objective-C \n\n @property (nonatomic) double speedAccuracy;\n\n- `\n ``\n ``\n `\n\n ### [updateTime](#/c:objc(cs)GMTSVehicleLocationOptions(py)updateTime)\n\n `\n ` \n The timestamp in milliseconds when the location was collected by the Driver application (client\n side). \n\n #### Declaration\n\n Swift \n\n var updateTime: TimeInterval { get set }\n\n Objective-C \n\n @property (nonatomic) NSTimeInterval updateTime;\n\n- `\n ``\n ``\n `\n\n ### [isSnappableToRoute](#/c:objc(cs)GMTSVehicleLocationOptions(py)isSnappableToRoute)\n\n `\n ` \n Indicates whether the vehicle can be snapped to the route. \n\n #### Declaration\n\n Swift \n\n var isSnappableToRoute: Bool { get set }\n\n Objective-C \n\n @property (nonatomic) BOOL isSnappableToRoute;\n\n- `\n ``\n ``\n `\n\n ### [updateServerTime](#/c:objc(cs)GMTSVehicleLocationOptions(py)updateServerTime)\n\n `\n ` \n The timestamp in milliseconds when Fleet Engine received the updated location from the Driver\n app. You can use this to determine if the \"Driver\" is \"Connected\". By comparing this timestamp\n with the current time in the device, you can determine how long ago the driver location was\n reported to Fleet Engine. A negative value indicates that this value is not valid (it is absent). \n\n #### Declaration\n\n Swift \n\n var updateServerTime: TimeInterval { get set }\n\n Objective-C \n\n @property (nonatomic) NSTimeInterval updateServerTime;"]]