Fleet Engine Entities

Task interface

google.maps.journeySharing.Task interface

The details for a task returned by Fleet Engine.

attributes
Type:Object<string, *>
Attributes assigned to the task.
name
Type:string
The task name in the format "providers/{provider_id}/tasks/{task_id}". The task_id must be a unique identifier and not a tracking ID. To store a tracking ID of a shipment, use the tracking_id field. Multiple tasks can have the same tracking_id.
remainingVehicleJourneySegments
Information about the segments left to be completed for this task.
status
Type:string
The current execution state of the task.
type
Type:string
The task type; for example, a break or shipment.
estimatedCompletionTimeoptional
Type:Dateoptional
The timestamp of the estimated completion time of the task.
latestVehicleLocationUpdateoptional
Information specific to the last location update.
outcomeoptional
Type:stringoptional
The outcome of the task.
outcomeLocationoptional
Type:LatLngLiteraloptional
The location where the task was completed (from provider).
outcomeLocationSourceoptional
Type:stringoptional
The setter of the task outcome location ('PROVIDER' or 'LAST_VEHICLE_LOCATION').
outcomeTimeoptional
Type:Dateoptional
The timestamp of when the task's outcome was set (from provider).
plannedLocationoptional
Type:LatLngLiteraloptional
The location where the task is to be completed.
targetTimeWindowoptional
Type:TimeWindowoptional
The time window during which the task should be completed.
trackingIdoptional
Type:stringoptional
The tracking ID of the shipment.
vehicleIdoptional
Type:stringoptional
The ID of the vehicle performing this task.

TaskInfo interface

google.maps.journeySharing.TaskInfo interface

TaskInfo type, used byDeliveryVehicleStop.

extraDurationMillisoptional
Type:numberoptional
The extra time it takes to perform the task, in milliseconds.
idoptional
Type:stringoptional
The ID of the task.
targetTimeWindowoptional
Type:TimeWindowoptional
The time window during which the task should be completed.

TaskTrackingInfo interface

google.maps.journeySharing.TaskTrackingInfo interface

The details for a task tracking info object returned by Fleet Engine.

attributes
Type:Object<string, *>
Attributes assigned to the task.
name
Type:string
The name in the format "providers/{provider_id}/taskTrackingInfo/{tracking_id}", wheretracking_idrepresents the tracking ID.
trackingId
Type:string
The tracking ID of a Task.
  • Must be a valid Unicode string.
  • Limited to a maximum length of 64 characters.
  • Normalized according toUnicode Normalization Form C.
  • May not contain any of the following ASCII characters: '/', ':', '?', ',', or '#'.
estimatedArrivalTimeoptional
Type:Dateoptional
The estimated arrival time to the stop location.
estimatedTaskCompletionTimeoptional
Type:Dateoptional
The estimated completion time of a Task.
latestVehicleLocationUpdateoptional
Information specific to the last location update.
plannedLocationoptional
Type:LatLngoptional
The location where the Task will be completed.
remainingDrivingDistanceMetersoptional
Type:numberoptional
The total remaining distance in meters to theVehicleStopof interest.
remainingStopCountoptional
Type:numberoptional
Indicates the number of stops the vehicle remaining until the task stop is reached, including the task stop. For example, if the vehicle's next stop is the task stop, the value will be 1.
routePolylinePointsoptional
Type:Array<LatLng>optional
A list of points which when connected forms a polyline of the vehicle's expected route to the location of this task.
stateoptional
Type:stringoptional
The current execution state of the Task.
targetTimeWindowoptional
Type:TimeWindowoptional
The time window during which the task should be completed.
taskOutcomeoptional
Type:stringoptional
The outcome of attempting to execute a Task.
taskOutcomeTimeoptional
Type:Dateoptional
The time when the Task's outcome was set by the provider.

Trip interface

google.maps.journeySharing.Trip interface

The details for a trip returned by Fleet Engine.

name
Type:string
In the format "providers/{provider_id}/trips/{trip_id}". The trip_id must be a unique identifier.
passengerCount
Type:number
Number of passengers on this trip; does not include the driver.
remainingWaypoints
An array of waypoints indicating the path from the current location to the drop-off point.
status
Type:string
Current status of the trip. Possible values are UNKNOWN_TRIP_STATUS, NEW, ENROUTE_TO_PICKUP, ARRIVED_AT_PICKUP, ARRIVED_AT_INTERMEDIATE_DESTINATION, ENROUTE_TO_INTERMEDIATE_DESTINATION, ENROUTE_TO_DROPOFF, COMPLETE, or CANCELED.
type
Type:string
The type of the trip. Possible values are UNKNOWN_TRIP_TYPE, SHARED or EXCLUSIVE.
vehicleId
Type:string
ID of the vehicle making this trip.
actualDropOffLocationoptional
Type:LatLngLiteraloptional
Location where the customer was dropped off.
actualPickupLocationoptional
Type:LatLngLiteraloptional
Location where the customer was picked up.
dropOffTimeoptional
Type:Dateoptional
The estimated future time when the passengers will be dropped off, or the actual time when they were dropped off.
latestVehicleLocationUpdateoptional
Information specific to the last location update.
pickupTimeoptional
Type:Dateoptional
The estimated future time when the passengers will be picked up, or the actual time when they were picked up.
plannedDropOffLocationoptional
Type:LatLngLiteraloptional
Location where the customer indicates they will be dropped off.
plannedPickupLocationoptional
Type:LatLngLiteraloptional
Location where customer indicates they will be picked up.

DeliveryVehicle interface

google.maps.journeySharing.DeliveryVehicle interface

The details for a delivery vehicle returned by Fleet Engine.

attributes
Type:Object<string, stringoptional>
Custom delivery vehicle attributes.
name
Type:string
In the format "providers/{provider_id}/deliveryVehicles/{delivery_vehicle_id}". The delivery_vehicle_id must be a unique identifier.
navigationStatus
Type:string
The current navigation status of the vehicle.
remainingDistanceMeters
Type:number
The remaining driving distance in the current route segment, in meters.
remainingVehicleJourneySegments
The journey segments assigned to this delivery vehicle, starting from the vehicle's most recently reported location. This is only populated when theDeliveryVehicledata object is provided throughFleetEngineDeliveryVehicleLocationProvider.
currentRouteSegmentEndPointoptional
Type:LatLngLiteraloptional
The location where the current route segment ends.
latestVehicleLocationUpdateoptional
The last reported location of the delivery vehicle.
remainingDurationMillisoptional
Type:numberoptional
The remaining driving duration in the current route segment, in milliseconds.

DeliveryVehicleStop interface

google.maps.journeySharing.DeliveryVehicleStop interface

DeliveryVehicleStop type

tasks
The list of Tasks to be performed at this stop.
  • id:the ID of the task.
  • extraDurationMillis:the extra time it takes to perform the task, in milliseconds.
plannedLocationoptional
Type:LatLngLiteraloptional
The location of the stop.
stateoptional
The state of the stop.

DeliveryVehicleStopState constants

google.maps.journeySharing.DeliveryVehicleStopState constants

The current state of aDeliveryVehicleStop.

Access by callingconst {DeliveryVehicleStopState} = await google.maps.importLibrary( "journeySharing" ).SeeLibraries in the Maps JavaScript API.

ARRIVED Arrived at stop. Assumes that when the vehicle is routing to the next stop, that all previous stops have been completed.
ENROUTE Assigned and actively routing.
NEW Created, but not actively routing.
UNSPECIFIED Unknown.

VehicleJourneySegment interface

google.maps.journeySharing.VehicleJourneySegment interface

VehicleJourneySegment type

drivingDistanceMetersoptional
Type:numberoptional
The travel distance from the previous stop to this stop, in meters.
drivingDurationMillisoptional
Type:numberoptional
The travel time from the previous stop this stop, in milliseconds.
pathoptional
Type:Array<LatLngLiteral>optional
The path from the previous stop (or the vehicle's current location, if this stop is the first in the list of stops) to this stop.
stopoptional
Type:DeliveryVehicleStopoptional
Information about the stop.

VehicleLocationUpdate interface

google.maps.journeySharing.VehicleLocationUpdate interface

VehicleLocationUpdate type

headingoptional
Type:numberoptional
The heading of the update. 0 corresponds to north, 180 to south.
locationoptional
Type:LatLngLiteral|LatLngoptional
The location of the update.
speedKilometersPerHouroptional
Type:numberoptional
The speed in kilometers per hour.
timeoptional
Type:Dateoptional
The time this update was received from the vehicle.

VehicleWaypoint interface

google.maps.journeySharing.VehicleWaypoint interface

VehicleWaypoint type.

distanceMetersoptional
Type:numberoptional
The path distance between the previous waypoint (or the vehicle's current location, if this waypoint is the first in the list of waypoints) to this waypoint in meters.
durationMillisoptional
Type:numberoptional
Travel time between the previous waypoint (or the vehicle's current location, if this waypoint is the first in the list of waypoints) to this waypoint in milliseconds.
locationoptional
Type:LatLngLiteraloptional
The location of the waypoint.
pathoptional
Type:Array<LatLngLiteral>optional
The path from the previous waypoint (or the vehicle's current location, if this waypoint is the first in the list of waypoints) to this waypoint.
speedReadingIntervalsoptional
The list of traffic speeds along the path from the previous waypoint (or vehicle location) to the current waypoint. Each interval in the list describes the traffic on a contiguous segment on the path; the interval defines the starting and ending points of the segment via their indices. See the definition ofSpeedReadingIntervalfor more details.

Vehicle interface

google.maps.journeySharing.Vehicle interface

The details for a vehicle returned by Fleet Engine.

attributes
Type:Object<string, *>
Custom vehicle attributes.
name
Type:string
In the format "providers/{provider_id}/vehicles/{vehicle_id}". The vehicle_id must be a unique identifier.
navigationStatus
The current navigation status of the vehicle.
remainingDistanceMeters
Type:number
The remaining driving distance in the current route segment, in meters.
vehicleState
The vehicle state.
vehicleType
The type of this vehicle.
currentRouteSegmentEndPointoptional
Type:TripWaypointoptional
The waypoint where current route segment ends.
currentRouteSegmentVersionoptional
Type:Dateoptional
Time when the current route segment was set.
currentTripsoptional
Type:Array<string>optional
List of trip IDs for trips currently assigned to this vehicle.
etaToFirstWaypointoptional
Type:Dateoptional
The ETA to the first entry in the waypoints field.
latestLocationoptional
The last reported location of the vehicle.
maximumCapacityoptional
Type:numberoptional
The total numbers of riders this vehicle can carry. The driver is not considered in this value.
supportedTripTypesoptional
Type:Array<TripType>optional
Trip types supported by this vehicle.
waypointsoptional
Type:Array<TripWaypoint>optional
The remaining waypoints assigned to this Vehicle.
waypointsVersionoptional
Type:Dateoptional
Last time the waypoints field was updated.

VehicleNavigationStatus constants

google.maps.journeySharing.VehicleNavigationStatus constants

The current navigation status of aVehicle.

Access by callingconst {VehicleNavigationStatus} = await google.maps.importLibrary( "journeySharing" ).SeeLibraries in the Maps JavaScript API.

ARRIVED_AT_DESTINATION The vehicle is within approximately 50m of the destination.
ENROUTE_TO_DESTINATION Turn-by-turn navigation is available and the Driver app navigation has entered GUIDED_NAV mode.
NO_GUIDANCE The Driver app's navigation is in FREE_NAV mode.
OFF_ROUTE The vehicle has gone off the suggested route.
UNKNOWN_NAVIGATION_STATUS Unspecified navigation status.

VehicleState constants

google.maps.journeySharing.VehicleState constants

The current state of aVehicle.

Access by callingconst {VehicleState} = await google.maps.importLibrary( "journeySharing" ).SeeLibraries in the Maps JavaScript API.

OFFLINE The vehicle is not accepting new trips.
ONLINE The vehicle is accepting new trips.
UNKNOWN_VEHICLE_STATE Unknown vehicle state.

VehicleType constants

google.maps.journeySharing.VehicleType constants

The type ofVehicle.

Access by callingconst {VehicleType} = await google.maps.importLibrary( "journeySharing" ).SeeLibraries in the Maps JavaScript API.

AUTO An automobile.
TAXI Any vehicle that acts as a taxi (typically licensed or regulated).
TRUCK A vehicle with a large storage capacity.
TWO_WHEELER A motorcycle, moped, or other two-wheeled vehicle.
UNKNOWN Unknown vehicle type.

TripType constants

google.maps.journeySharing.TripType constants

Trip types supported by aVehicle.

Access by callingconst {TripType} = await google.maps.importLibrary( "journeySharing" ).SeeLibraries in the Maps JavaScript API.

EXCLUSIVE The trip is exclusive to a vehicle.
SHARED The trip may share a vehicle with other trips.
UNKNOWN_TRIP_TYPE Unknown trip type.

TripWaypoint interface

google.maps.journeySharing.TripWaypoint interface

TripWaypoint type.

distanceMetersoptional
Type:numberoptional
The path distance between the previous waypoint (or the vehicle's current location, if this waypoint is the first in the list of waypoints) to this waypoint in meters.
durationMillisoptional
Type:numberoptional
Travel time between the previous waypoint (or the vehicle's current location, if this waypoint is the first in the list of waypoints) to this waypoint in milliseconds.
locationoptional
Type:LatLngoptional
The location of the waypoint.
pathoptional
Type:Array<LatLng>optional
The path from the previous stop (or the vehicle's current location, if this stop is the first in the list of stops) to this stop.
speedReadingIntervalsoptional
The list of traffic speeds along the path from the previous waypoint (or vehicle location) to the current waypoint. Each interval in the list describes the traffic on a contiguous segment on the path; the interval defines the starting and ending points of the segment via their indices. See the definition ofSpeedReadingIntervalfor more details.
tripIdoptional
Type:stringoptional
The trip associated with this waypoint.
waypointTypeoptional
Type:WaypointTypeoptional
The role this waypoint plays in this trip, such as pickup or dropoff.

WaypointType constants

google.maps.journeySharing.WaypointType constants

Waypoint types supported byVehicle.

Access by callingconst {WaypointType} = await google.maps.importLibrary( "journeySharing" ).SeeLibraries in the Maps JavaScript API.

DROP_OFF_WAYPOINT_TYPE Waypoints for dropping off riders.
INTERMEDIATE_DESTINATION_WAYPOINT_TYPE Waypoints for intermediate destinations in a multi-destination trip.
PICKUP_WAYPOINT_TYPE Waypoints for picking up riders.
UNKNOWN_WAYPOINT_TYPE Unknown waypoint type.

TimeWindow interface

google.maps.journeySharing.TimeWindow interface

A time range.

endTime
Type:Date
The end time of the time window (inclusive).
startTime
Type:Date
The start time of the time window (inclusive).

Speed constants

google.maps.journeySharing.Speed constants

The classification of polyline speed based on traffic data.

Access by callingconst {Speed} = await google.maps.importLibrary( "journeySharing" ).SeeLibraries in the Maps JavaScript API.

NORMAL Normal speed, no slowdown is detected.
SLOW Slowdown detected, but no traffic jam formed.
TRAFFIC_JAM Traffic jam detected.

SpeedReadingInterval interface

google.maps.journeySharing.SpeedReadingInterval interface

Traffic density indicator on a contiguous path segment. The interval defines the starting and ending points of the segment via their indices.

endPolylinePointIndex
Type:number
The zero-based index of the ending point of the interval in the path.
speed
Type:Speed
Traffic speed in this interval.
startPolylinePointIndex
Type:number
The zero-based index of the starting point of the interval in the path.