TrafficModel
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이 필드는 아래 열거형에 표시된 교통 상황에서 이동 시간을 계산할 때 사용할 다음 가정 중 하나를 지정합니다. 선택한 enum에 따라 TrafficModel 응답의 duration
필드가 달라집니다. 이 값에는 이전 평균을 기반으로 한 예상 이동 시간이 포함됩니다. TrafficModel
은(는) RoutingPreference
을 TRAFFIC_AWARE_OPTIMAL
로, RouteTravelMode
을 DRIVE
로 설정한 요청에만 사용할 수 있습니다.
열거형 |
TRAFFIC_MODEL_UNSPECIFIED |
사용하지 않습니다. 지정된 경우 기본값은 BEST_GUESS 입니다. |
BEST_GUESS |
이전 교통상황과 실시간 교통정보에 대해 알려진 정보를 기준으로 할 때 반환된 duration 이 최적의 예상 이동 시간임을 나타냅니다. departureTime 이 지금에 가까울수록 실시간 교통정보가 더 중요합니다. |
PESSIMISTIC |
반환된 시간이 대부분의 날에 실제 이동 시간보다 더 길다는 것을 나타내지만 특히 교통상황이 나쁜 날은 이 값을 초과할 수도 있습니다. |
OPTIMISTIC |
반환된 시간이 대부분의 날에 실제 이동 시간보다 짧다는 것을 나타냅니다. 다만 교통상황이 특별히 좋은 날은 이 값보다 빠를 수도 있습니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-31(UTC)
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eThe \u003ccode\u003eduration\u003c/code\u003e field provides estimated travel time influenced by the \u003ccode\u003etraffic_model\u003c/code\u003e setting.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003etraffic_model\u003c/code\u003e options include \u003ccode\u003eBEST_GUESS\u003c/code\u003e (default), \u003ccode\u003ePESSIMISTIC\u003c/code\u003e, and \u003ccode\u003eOPTIMISTIC\u003c/code\u003e, impacting travel time predictions.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eBEST_GUESS\u003c/code\u003e considers historical and live traffic data for travel time estimation, with live traffic having more impact closer to departure.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ePESSIMISTIC\u003c/code\u003e and \u003ccode\u003eOPTIMISTIC\u003c/code\u003e offer durations longer and shorter than actual travel times on most days, respectively, accounting for traffic variations.\u003c/p\u003e\n"]]],["The core content outlines how to specify traffic-based time calculations, impacting the `duration` field. The `TRAFFIC_MODEL_UNSPECIFIED` defaults to `BEST_GUESS`, which uses historical and live data to estimate travel time. `PESSIMISTIC` calculates a longer travel time, likely exceeded only in severe conditions. Conversely, `OPTIMISTIC` calculates a shorter time, potentially beaten during favorable conditions. These options modify the estimated duration by factoring in historical traffic data and real-time conditions.\n"],null,["# TrafficModel\n\nSpecifies the assumptions to use when calculating time in traffic. This setting affects the value returned in the `duration` field in the response, which contains the predicted time in traffic based on historical averages.\n\n| Enums ||\n|-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `TRAFFIC_MODEL_UNSPECIFIED` | Unused. If specified, will default to `BEST_GUESS`. |\n| `BEST_GUESS` | Indicates that the returned `duration` should be the best estimate of travel time given what is known about both historical traffic conditions and live traffic. Live traffic becomes more important the closer the `departureTime` is to now. |\n| `PESSIMISTIC` | Indicates that the returned duration should be longer than the actual travel time on most days, though occasional days with particularly bad traffic conditions may exceed this value. |\n| `OPTIMISTIC` | Indicates that the returned duration should be shorter than the actual travel time on most days, though occasional days with particularly good traffic conditions may be faster than this value. |"]]