Method: projects.trips.get

获取行程。

HTTP 请求

GET https://navigationconnect.googleapis.com/v1/{name=projects/*/trips/*}

网址采用 gRPC 转码语法。

路径参数

参数
name

string

必需。要获取的行程的资源名称。格式:projects/{project}/trips/{tripId}

查询参数

参数
routePolylineFormat

enum (RoutePolylineFormat)

可选。要返回的路线多段线的格式。如果未设置,系统将返回 SIMPLE 路线折线。

请求正文

请求正文必须为空。

响应正文

如果成功,则响应正文包含一个 Trip 实例。

授权范围

需要以下 OAuth 范围:

  • https://www.googleapis.com/auth/cloud-platform

IAM 权限

需要拥有 name 资源的以下 IAM 权限:

  • navigationconnect.trips.get

如需了解详情,请参阅 IAM 文档

RoutePolylineFormat

指定路线折线的格式。

枚举
ROUTE_POLYLINE_FORMAT_UNSPECIFIED 路线折线格式未指定。
SIMPLE 路线折线以表示为 google.type.LatLng 的简单点数组形式返回。
ENCODED 路线多段线以编码字符串的形式返回。请参阅 https://developers.google.com/maps/documentation/utilities/polylinealgorithm
S2ENCODED 路线多段线编码为 S2Polyline。请参阅 https://s2geometry.io/devguide/basic_types.html
GEO_JSON 路线多段线以 GeoJSON LineString 的形式返回。请参阅 https://tools.ietf.org/html/rfc7946#section-3.1.4