ConsumableTrafficPolyline
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
JSON 表示法 |
{
"speedReadingInterval": [
{
object (SpeedReadingInterval )
}
],
"encodedPathToWaypoint": string
} |
字段 |
speedReadingInterval[] |
object (SpeedReadingInterval )
从上一个航点到当前航点沿路的交通速度。
|
encodedPathToWaypoint |
string
驾驶员从上一个航点到当前航点所走的路径。此路径包含地标,以便客户端显示路径沿途的交通标记(请参阅 speedReadingInterval )。尚不支持解码。
|
SpeedReadingInterval
路径连续路段上的交通密度指示器。假设有一个包含点 P_0、P_1、...、P_N(从零开始编号)的路径,SpeedReadingInterval 会定义一个间隔,并使用以下类别描述其流量。
JSON 表示法 |
{
"startPolylinePointIndex": integer,
"endPolylinePointIndex": integer,
"speed": enum (Speed )
} |
字段 |
startPolylinePointIndex |
integer
此时间段在路径中的起始索引。在 JSON 中,当编号为 0 时,该字段将显示为未填充。
|
endPolylinePointIndex |
integer
路径中此时间段的结束索引。在 JSON 中,当编号为 0 时,该字段将显示为未填充。
|
speed |
enum (Speed )
此时间段内的交通速度。
|
速度
枚举 |
SPEED_UNSPECIFIED |
默认值。此值未使用。 |
NORMAL |
正常速度,无交通延误。 |
SLOW |
检测到速度放慢,车流量中等。 |
TRAFFIC_JAM |
交通延误。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eConsumableTrafficPolyline provides traffic density information along a vehicle's path using encoded polylines and speed readings.\u003c/p\u003e\n"],["\u003cp\u003eSpeedReadingInterval objects represent traffic conditions on segments of the path, indicating speed levels like normal, slow, or traffic jam.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003espeed\u003c/code\u003e field within SpeedReadingInterval classifies traffic speed into categories: \u003ccode\u003eSPEED_UNSPECIFIED\u003c/code\u003e, \u003ccode\u003eNORMAL\u003c/code\u003e, \u003ccode\u003eSLOW\u003c/code\u003e, and \u003ccode\u003eTRAFFIC_JAM\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eencodedPathToWaypoint\u003c/code\u003e is a string representing the path with landmarks, enabling the display of traffic markers; decoding is not yet supported.\u003c/p\u003e\n"]]],["The provided content describes traffic data along a vehicle's path using JSON representations. Key information includes `speedReadingInterval`, which details traffic speed between waypoints. This is represented by a list of segments, each defined by `startPolylinePointIndex`, `endPolylinePointIndex`, and `speed`. The `encodedPathToWaypoint` field indicates the path from the previous to the current waypoint. The speed within each interval is categorized as `NORMAL`, `SLOW`, or `TRAFFIC_JAM`. Fields with 0 index will be unpopulated in the JSON representation.\n"],null,["# ConsumableTrafficPolyline\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [SpeedReadingInterval](#SpeedReadingInterval)\n - [JSON representation](#SpeedReadingInterval.SCHEMA_REPRESENTATION)\n- [Speed](#Speed)\n\nTraffic density along a Vehicle's path.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"speedReadingInterval\": [ { object (/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/ConsumableTrafficPolyline#SpeedReadingInterval) } ], \"encodedPathToWaypoint\": string } ``` |\n\n| Fields ||\n|--------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `speedReadingInterval[]` | `object (`[SpeedReadingInterval](/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/ConsumableTrafficPolyline#SpeedReadingInterval)`)` Traffic speed along the path from the previous waypoint to the current waypoint. |\n| `encodedPathToWaypoint` | `string` The path the driver is taking from the previous waypoint to the current waypoint. This path has landmarks in it so clients can show traffic markers along the path (see `speedReadingInterval`). Decoding is not yet supported. |\n\nSpeedReadingInterval\n--------------------\n\nTraffic density indicator on a contiguous segment of a path. Given a path with points P_0, P_1, ... , P_N (zero-based index), the SpeedReadingInterval defines an interval and describes its traffic using the following categories.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"startPolylinePointIndex\": integer, \"endPolylinePointIndex\": integer, \"speed\": enum (/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/ConsumableTrafficPolyline#Speed) } ``` |\n\n| Fields ||\n|---------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `startPolylinePointIndex` | `integer` The starting index of this interval in the path. In JSON, when the index is 0, the field will appear to be unpopulated. |\n| `endPolylinePointIndex` | `integer` The ending index of this interval in the path. In JSON, when the index is 0, the field will appear to be unpopulated. |\n| `speed` | `enum (`[Speed](/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/ConsumableTrafficPolyline#Speed)`)` Traffic speed in this interval. |\n\nSpeed\n-----\n\nThe classification of polyline speed based on traffic data.\n\n| Enums ||\n|---------------------|----------------------------------------------|\n| `SPEED_UNSPECIFIED` | Default value. This value is unused. |\n| `NORMAL` | Normal speed, no traffic delays. |\n| `SLOW` | Slowdown detected, medium amount of traffic. |\n| `TRAFFIC_JAM` | Traffic delays. |"]]