Fleet Engine Entities

Task 介面

介面 google.maps.journeySharing.Task

Fleet Engine 傳回的工作詳細資料。

attributes
類型: Object<string, *>
指派給工作的屬性。
name
類型: string
工作名稱,格式為「providers/{provider_id}/tasks/{task_id}」。task_id 必須是專屬 ID,而非追蹤 ID。如要儲存貨品的追蹤 ID,請使用 tracking_id 欄位。多項工作可以有相同的 tracking_id。
remainingVehicleJourneySegments
這項工作剩餘待完成區隔的相關資訊。
status
類型: string
工作目前的執行狀態。
type
類型: string
工作類型,例如休息或運送。
estimatedCompletionTime
選填
類型: Date optional
工作預估完成時間的時間戳記。
latestVehicleLocationUpdate
選填
類型: VehicleLocationUpdate optional
上次位置更新通知的特定資訊。
outcome
選填
類型: string optional
工作結果。
outcomeLocation
選填
類型: LatLngLiteral optional
完成工作的地點 (由供應商提供)。
outcomeLocationSource
選填
類型: string optional
工作結果位置的設定者 (「PROVIDER」或「LAST_VEHICLE_LOCATION」)。
outcomeTime
選填
類型: Date optional
設定任務結果的時間戳記 (由供應商提供)。
plannedLocation
選填
類型: LatLngLiteral optional
工作完成地點。
targetTimeWindow
選填
類型: TimeWindow optional
應完成工作的時間範圍。
trackingId
選填
類型: string optional
貨品的追蹤 ID。
vehicleId
選填
類型: string optional
執行這項工作的車輛 ID。

TaskInfo 介面

介面 google.maps.journeySharing.TaskInfo

TaskInfo 類型,由 DeliveryVehicleStop 使用。

extraDurationMillis
選填
類型: number optional
執行工作所需的額外時間 (以毫秒為單位)。
id
選填
類型: string optional
工作的 ID。
targetTimeWindow
選填
類型: TimeWindow optional
應完成工作的時間範圍。

TaskTrackingInfo 介面

介面 google.maps.journeySharing.TaskTrackingInfo

Fleet Engine 傳回的工作追蹤資訊物件詳細資料。

attributes
類型: Object<string, *>
指派給工作的屬性。
name
類型: string
名稱格式為「providers/{provider_id}/taskTrackingInfo/{tracking_id}」,其中 tracking_id 代表追蹤 ID。
trackingId
類型: string
工作的追蹤 ID。
  • 必須是有效的 Unicode 字串。
  • 長度上限為 64 個半形字元。
  • 根據萬國碼 (Unicode) 正規化形式 C 進行正規化。
  • 不得包含下列任何 ASCII 字元:「/」、「:」、「?」、「,」或「#」。
estimatedArrivalTime
選填
類型: Date optional
預計抵達停靠站的時間。
estimatedTaskCompletionTime
選填
類型: Date optional
預計完成工作的時間。
latestVehicleLocationUpdate
選填
類型: VehicleLocationUpdate optional
上次位置更新通知的特定資訊。
plannedLocation
選填
類型: LatLng optional
完成工作的地點。
remainingDrivingDistanceMeters
選填
類型: number optional
到感興趣的VehicleStop的總剩餘距離 (以公尺為單位)。
remainingStopCount
選填
類型: number optional
指出車輛在抵達任務停靠站前,還會停靠幾站 (包含任務停靠站)。舉例來說,如果車輛的下一個停靠站是任務停靠站,值就會是 1。
routePolylinePoints
選填
類型: Array<LatLng> optional
一系列點,連接後會形成車輛預計前往這項工作地點的路線折線。
state
選填
類型: string optional
工作目前的執行狀態。
targetTimeWindow
選填
類型: TimeWindow optional
應完成工作的時間範圍。
taskOutcome
選填
類型: string optional
嘗試執行工作的結果。
taskOutcomeTime
選填
類型: Date optional
供應商設定任務結果的時間。

Trip 介面

介面 google.maps.journeySharing.Trip

Fleet Engine 傳回的行程詳細資料。

name
類型: string
格式為「providers/{provider_id}/trips/{trip_id}」。trip_id 必須是專屬 ID。
passengerCount
類型: number
這趟行程的乘客人數,不含司機。
remainingWaypoints
路線控點陣列,表示從目前位置到下車點的路徑。
status
類型: string
行程的目前狀態。可能的值包括 UNKNOWN_TRIP_STATUS、NEW、ENROUTE_TO_PICKUP、ARRIVED_AT_PICKUP、ARRIVED_AT_INTERMEDIATE_DESTINATION、ENROUTE_TO_INTERMEDIATE_DESTINATION、ENROUTE_TO_DROPOFF、COMPLETE 或 CANCELED。
type
類型: string
行程類型。可能的值為 UNKNOWN_TRIP_TYPE、SHARED 或 EXCLUSIVE。
vehicleId
類型: string
提供這趟行程的車輛 ID。
actualDropOffLocation
選填
類型: LatLngLiteral optional
顧客下車的地點。
actualPickupLocation
選填
類型: LatLngLiteral optional
顧客上車的地點。
dropOffTime
選填
類型: Date optional
乘客預計下車時間或實際下車時間。
latestVehicleLocationUpdate
選填
類型: VehicleLocationUpdate optional
上次位置更新通知的特定資訊。
pickupTime
選填
類型: Date optional
預估乘客上車時間,或實際乘客上車時間。
plannedDropOffLocation
選填
類型: LatLngLiteral optional
顧客指定的下車地點。
plannedPickupLocation
選填
類型: LatLngLiteral optional
顧客指定的上車地點。

DeliveryVehicle 介面

介面 google.maps.journeySharing.DeliveryVehicle

Fleet Engine 傳回的貨車詳細資料。

attributes
類型: Object<string, string optional>
自訂貨車屬性。
name
類型: string
格式為「providers/{provider_id}/deliveryVehicles/{delivery_vehicle_id}」。delivery_vehicle_id 必須是專屬 ID。
navigationStatus
類型: string
車輛目前的導航狀態。
remainingDistanceMeters
類型: number
目前路段的剩餘行駛距離 (以公尺為單位)。
remainingVehicleJourneySegments
指派給這輛貨車的行程區段,從車輛最近回報的位置開始。只有在透過 FleetEngineDeliveryVehicleLocationProvider 提供 DeliveryVehicle 資料物件時,系統才會填入這項資訊。
currentRouteSegmentEndPoint
選填
類型: LatLngLiteral optional
目前路線區段的終點位置。
latestVehicleLocationUpdate
選填
類型: VehicleLocationUpdate optional
外送車輛上次回報的位置。
remainingDurationMillis
選填
類型: number optional
目前路線區段的剩餘行車時間,以毫秒為單位。

DeliveryVehicleStop 介面

介面 google.maps.journeySharing.DeliveryVehicleStop

DeliveryVehicleStop 類型

tasks
類型: Array<TaskInfo>
在這個停靠點要執行的工作清單。
  • id:任務 ID。
  • extraDurationMillis:執行工作所需的額外時間 (以毫秒為單位)。
plannedLocation
選填
類型: LatLngLiteral optional
停靠站的位置。
state
選填
類型: DeliveryVehicleStopState optional
停靠站的狀態。

DeliveryVehicleStopState 常數

constants google.maps.journeySharing.DeliveryVehicleStopState
library "journeySharing"

DeliveryVehicleStop 的目前狀態。

這些常數也可以做為字串使用。在 TypeScript 中,字串常值是由 DeliveryVehicleStopStateString 類型定義。

const {DeliveryVehicleStopState} = await google.maps.importLibrary("journeySharing");
ARRIVED 已抵達停靠點。假設車輛規劃前往下一個停靠站時,所有先前的停靠站都已完成。
ENROUTE 已指派且正在轉送。
NEW 已建立,但未主動轉送。
UNSPECIFIED 不明。

VehicleJourneySegment 介面

介面 google.maps.journeySharing.VehicleJourneySegment

VehicleJourneySegment 類型

drivingDistanceMeters
選填
類型: number optional
從前一個停靠站到這個停靠站的移動距離,以公尺為單位。
drivingDurationMillis
選填
類型: number optional
從前一個停靠站到這個停靠站的行程時間,以毫秒為單位。
path
選填
類型: Array<LatLngLiteral> optional
從前一個停靠站 (如果這個停靠站是清單中的第一個,則為車輛目前位置) 到這個停靠站的路徑。
stop
選填
類型: DeliveryVehicleStop optional
停靠站的相關資訊。

VehicleLocationUpdate 介面

介面 google.maps.journeySharing.VehicleLocationUpdate

VehicleLocationUpdate 類型

heading
選填
類型: number optional
更新內容的標題。0 對應北,180 對應南。
location
選填
類型: LatLngLiteral|LatLng optional
更新位置。
speedKilometersPerHour
選填
類型: number optional
速度 (公里/小時)。
time
選填
類型: Date optional
從車輛收到這項更新的時間。

VehicleWaypoint 介面

介面 google.maps.journeySharing.VehicleWaypoint

VehicleWaypoint 類型。

distanceMeters
選填
類型: number optional
從上一個路線控點 (如果這個路線控點是清單中的第一個,則為車輛目前位置) 到這個路線控點的路徑距離,以公尺為單位。
durationMillis
選填
類型: number optional
從上一個路線控點 (如果這個路線控點是清單中的第一個,則為車輛目前位置) 到這個路線控點的行程時間,以毫秒為單位。
location
選填
類型: LatLngLiteral optional
路線控點的位置。
path
選填
類型: Array<LatLngLiteral> optional
從上一個路線控點 (如果這個路線控點是清單中的第一個,則為車輛目前位置) 到這個路線控點的路徑。
speedReadingIntervals
選填
類型: Array<SpeedReadingInterval> optional
從上一個路線控點 (或車輛位置) 到目前路線控點的路徑車速清單。清單中的每個間隔都會說明路徑上連續路段的車流量;間隔會透過索引定義路段的起點和終點。詳情請參閱 SpeedReadingInterval 的定義。

Vehicle 介面

介面 google.maps.journeySharing.Vehicle

Fleet Engine 傳回的車輛詳細資料。

attributes
類型: Object<string, *>
自訂車輛屬性。
name
類型: string
格式為「providers/{provider_id}/vehicles/{vehicle_id}」。vehicle_id 必須是專屬 ID。
navigationStatus
車輛目前的導航狀態。
remainingDistanceMeters
類型: number
目前路段的剩餘行駛距離 (以公尺為單位)。
vehicleState
類型: VehicleState
車輛狀態。
vehicleType
類型: VehicleType
這輛車的類型。
currentRouteSegmentEndPoint
選填
類型: TripWaypoint optional
目前路線區段結束的路線控點。
currentRouteSegmentVersion
選填
類型: Date optional
設定目前路線區段的時間。
currentTrips
選填
類型: Array<string> optional
目前指派給這輛車的行程 ID 清單。
etaToFirstWaypoint
選填
類型: Date optional
抵達路線控點欄位中第一個項目的預計到達時間。
latestLocation
選填
類型: VehicleLocationUpdate optional
車輛上次回報的位置。
maximumCapacity
選填
類型: number optional
這輛車可載運的乘客總數。這個值不包含司機。
supportedTripTypes
選填
類型: Array<TripType> optional
這輛車支援的行程類型。
waypoints
選填
類型: Array<TripWaypoint> optional
指派給這輛車輛的其餘路線控點。
waypointsVersion
選填
類型: Date optional
上次更新路線控點欄位的時間。

VehicleNavigationStatus 常數

constants google.maps.journeySharing.VehicleNavigationStatus
library "journeySharing"

Vehicle 的目前導航狀態。

這些常數也可以做為字串使用。在 TypeScript 中,字串常值是由 VehicleNavigationStatusString 類型定義。

const {VehicleNavigationStatus} = await google.maps.importLibrary("journeySharing");
ARRIVED_AT_DESTINATION 車輛距離目的地約 50 公尺。
ENROUTE_TO_DESTINATION 即時路況導航功能可用,且司機應用程式導航已進入 GUIDED_NAV 模式。
NO_GUIDANCE 司機應用程式的導航功能處於 FREE_NAV 模式。
OFF_ROUTE 車輛已偏離建議路線。
UNKNOWN_NAVIGATION_STATUS 未指定導航狀態。

VehicleState 常數

constants google.maps.journeySharing.VehicleState
library "journeySharing"

Vehicle 的目前狀態。

這些常數也可以做為字串使用。在 TypeScript 中,字串常值是由 VehicleStateString 類型定義。

const {VehicleState} = await google.maps.importLibrary("journeySharing");
OFFLINE 車輛不接受新行程。
ONLINE 車輛正在接受新行程。
UNKNOWN_VEHICLE_STATE 車輛狀態不明。

VehicleType 常數

constants google.maps.journeySharing.VehicleType
library "journeySharing"

Vehicle 的類型。

這些常數也可以做為字串使用。在 TypeScript 中,字串常值是由 VehicleTypeString 類型定義。

const {VehicleType} = await google.maps.importLibrary("journeySharing");
AUTO 汽車。
TAXI 任何做為計程車使用的車輛 (通常須取得執照或受法規管制)。
TRUCK 載貨量大的車輛。
TWO_WHEELER 機車、輕型機車或其他兩輪車輛。
UNKNOWN 不明車輛類型。

TripType 常數

constants google.maps.journeySharing.TripType
library "journeySharing"

Vehicle 支援的行程類型。

這些常數也可以做為字串使用。在 TypeScript 中,字串常值是由 TripTypeString 類型定義。

const {TripType} = await google.maps.importLibrary("journeySharing");
EXCLUSIVE 行程專屬於車輛。
SHARED 這趟行程可能會與其他行程共用車輛。
UNKNOWN_TRIP_TYPE 行程類型不明。

TripWaypoint 介面

介面 google.maps.journeySharing.TripWaypoint

TripWaypoint 類型。

distanceMeters
選填
類型: number optional
從上一個路線控點 (如果這個路線控點是清單中的第一個,則為車輛目前位置) 到這個路線控點的路徑距離,以公尺為單位。
durationMillis
選填
類型: number optional
從上一個路線控點 (如果這個路線控點是清單中的第一個,則為車輛目前位置) 到這個路線控點的行程時間,以毫秒為單位。
location
選填
類型: LatLng optional
路線控點的位置。
path
選填
類型: Array<LatLng> optional
從前一個停靠站 (如果這個停靠站是清單中的第一個,則為車輛目前位置) 到這個停靠站的路徑。
speedReadingIntervals
選填
類型: Array<SpeedReadingInterval> optional
從上一個路線控點 (或車輛位置) 到目前路線控點的路徑車速清單。清單中的每個間隔都會說明路徑上連續路段的車流量;間隔會透過索引定義路段的起點和終點。詳情請參閱 SpeedReadingInterval 的定義。
tripId
選填
類型: string optional
與這個路線控點相關聯的行程。
waypointType
選填
類型: WaypointType optional
這個路線控點在行程中的角色,例如上車或下車。

WaypointType 常數

constants google.maps.journeySharing.WaypointType
library "journeySharing"

Vehicle 支援的路線控點類型。

這些常數也可以做為字串使用。在 TypeScript 中,字串常值是由 WaypointTypeString 類型定義。

const {WaypointType} = await google.maps.importLibrary("journeySharing");
DROP_OFF_WAYPOINT_TYPE 乘客下車的路線控點。
INTERMEDIATE_DESTINATION_WAYPOINT_TYPE 多目的地行程的中途目的地路線控點。
PICKUP_WAYPOINT_TYPE 乘客上車的路線控點。
UNKNOWN_WAYPOINT_TYPE 不明的路線控點類型。

TimeWindow 介面

介面 google.maps.journeySharing.TimeWindow

日期範圍。

endTime
類型: Date
時間範圍的結束時間 (含)。
startTime
類型: Date
時間範圍的開始時間 (含)。

Speed 常數

constants google.maps.journeySharing.Speed
library "journeySharing"

根據車流量資料分類的折線速度。

這些常數也可以做為字串使用。在 TypeScript 中,字串常值是由 SpeedString 類型定義。

const {Speed} = await google.maps.importLibrary("journeySharing");
NORMAL 正常速度,未偵測到車多擁擠。
SLOW 偵測到車多擁擠,但未形成塞車。
TRAFFIC_JAM 偵測到交通壅塞。

SpeedReadingInterval 介面

介面 google.maps.journeySharing.SpeedReadingInterval

連續路徑區段上的車流量密度指標。間隔會透過索引定義片段的起點和終點。

endPolylinePointIndex
類型: number
路徑中區間終點的索引 (從零算起)。
speed
類型: Speed
這個區間的車流速度。
startPolylinePointIndex
類型: number
路徑中區間起點的索引 (從零算起)。