RoutingSummary
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
응답의 경로 출발지에서 장소까지의 시간 및 거리와 요청된 경우 해당 장소에서 목적지까지의 두 번째 구간입니다. 참고: 요청에 routingParameters.origin
매개변수 또는 searchAlongRouteParameters.polyline.encodedPolyline
매개변수를 포함하지 않고 필드 마스크에 routingSummaries
를 추가하면 오류가 발생합니다.
JSON 표현 |
{
"legs": [
{
object (Leg )
}
],
"directionsUri": string
} |
필드 |
legs[] |
object (Leg )
여행 구간입니다. 설정된 출발지에서 이동 시간과 거리를 계산할 때 legs 에는 출발지에서 목적지까지의 시간과 거리가 포함된 단일 구간이 포함됩니다. 경로를 따라 검색하면 legs 에는 출발지에서 장소까지의 구간과 장소에서 목적지까지의 구간이 각각 하나씩 포함됩니다.
|
directionsUri |
string
지정된 경로 요약의 중간 지점을 사용하여 Google 지도에 경로를 표시하는 링크입니다. 이 링크에서 생성된 경로는 라우팅 요약을 생성하는 데 사용된 경로와 동일하지 않을 수 있습니다. 링크는 요청에 제공된 정보(해당하는 경우 routingParameters 및 searchAlongRouteParameters 필드 포함)를 사용하여 경로 링크를 생성합니다.
|
다리
구간은 한 위치에서 다른 위치로 이동하는 여정의 한 부분입니다.
JSON 표현 |
{
"duration": string,
"distanceMeters": integer
} |
필드 |
duration |
string (Duration format)
이 구간의 이동을 완료하는 데 걸리는 시간입니다. 소수점 아래가 최대 9자리까지이고 's '로 끝나는 초 단위 기간입니다. 예를 들면 "3.5s" 입니다.
|
distanceMeters |
integer
이 여행 구간의 거리입니다.
|
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-31(UTC)
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eRouting Summary provides the duration and distance between an origin and a destination, or between an origin, a place, and a destination when searching along a route.\u003c/p\u003e\n"],["\u003cp\u003eIt includes a directions URI for viewing the route on Google Maps.\u003c/p\u003e\n"],["\u003cp\u003eA Leg within the Routing Summary represents a portion of the journey, containing duration and distance in meters.\u003c/p\u003e\n"],["\u003cp\u003eWhen searching along a route, the \u003ccode\u003elegs\u003c/code\u003e field will contain two legs: one from the origin to the place and another from the place to the destination.\u003c/p\u003e\n"]]],["The content details routing summary data, including journey legs and a directions link. A routing summary contains \"legs,\" with each leg representing a portion of a journey. Each `leg` provides `duration` (time to complete the leg) and `distanceMeters`. The `directionsUri` field provides a Google Maps link for directions. When searching along a route, the summary includes two legs, otherwise it only includes one. Including `routingSummaries` in a request requires including an `origin` or `encodedPolyline` parameter.\n"],null,["# RoutingSummary\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [Leg](#Leg)\n - [JSON representation](#Leg.SCHEMA_REPRESENTATION)\n\nThe duration and distance from the routing origin to a place in the response, and a second leg from that place to the destination, if requested. **Note:** Adding `routingSummaries` in the field mask without also including either the `routingParameters.origin` parameter or the `searchAlongRouteParameters.polyline.encodedPolyline` parameter in the request causes an error.\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"legs\": [ { object (/maps/documentation/places/web-service/reference/rest/v1/RoutingSummary#Leg) } ], \"directionsUri\": string } ``` |\n\n| Fields ||\n|-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `legs[]` | `object (`[Leg](/maps/documentation/places/web-service/reference/rest/v1/RoutingSummary#Leg)`)` The legs of the trip. When you calculate travel duration and distance from a set origin, `legs` contains a single leg containing the duration and distance from the origin to the destination. When you do a search along route, `legs` contains two legs: one from the origin to place, and one from the place to the destination. |\n| `directionsUri` | `string` A link to show directions on Google Maps using the waypoints from the given routing summary. The route generated by this link is not guaranteed to be the same as the route used to generate the routing summary. The link uses information provided in the request, from fields including `routingParameters` and `searchAlongRouteParameters` when applicable, to generate the directions link. |\n\nLeg\n---\n\nA leg is a single portion of a journey from one location to another.\n\n| JSON representation |\n|-----------------------------------------------------------|\n| ``` { \"duration\": string, \"distanceMeters\": integer } ``` |\n\n| Fields ||\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `duration` | `string (`[Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration)` format)` The time it takes to complete this leg of the trip. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `\"3.5s\"`. |\n| `distanceMeters` | `integer` The distance of this leg of the trip. |"]]