RoutingPreference
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ルートの計算時に考慮すべき要素を指定する値のセット。
列挙型 |
ROUTING_PREFERENCE_UNSPECIFIED |
ルーティング設定が指定されていません。デフォルトは TRAFFIC_UNAWARE です。 |
TRAFFIC_UNAWARE |
リアルタイムの交通状況を考慮せずにルートを計算します。交通状況がほとんどない場合や、該当しない場合に適しています。この値を使用すると、レイテンシが最小になります。注: RouteTravelMode DRIVE と TWO_WHEELER について選択されるルートと所要時間は、現在の道路状況ではなく、道路網と時間以外の平均的な交通状況に基づいています。そのため、一時的に閉鎖されている道路がルートに含まれる場合があります。道路網の変化、平均交通量の更新、サービスの分散状況などにより、リクエストの内容は時間とともに変化する可能性があります。また、結果は、ほぼ同等のルートでも、時刻や頻度によって異なる場合があります。 |
TRAFFIC_AWARE |
リアルタイムの交通状況を考慮してルートを計算します。TRAFFIC_AWARE_OPTIMAL とは対照的に、いくつかの最適化が適用され、レイテンシが大幅に短縮されます。 |
TRAFFIC_AWARE_OPTIMAL |
現在の交通状況を考慮してルートを計算します。パフォーマンスの最適化はほとんど適用されません。この値を使用すると、レイテンシが最も高くなります。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-31 UTC。
[null,null,["最終更新日 2025-08-31 UTC。"],[[["\u003cp\u003eRouting preferences determine how routes are calculated, considering factors like traffic conditions.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTRAFFIC_UNAWARE\u003c/code\u003e provides the fastest routes without considering real-time traffic, suitable when traffic is irrelevant.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTRAFFIC_AWARE\u003c/code\u003e balances speed and accuracy by incorporating live traffic data with some optimizations for reduced latency.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTRAFFIC_AWARE_OPTIMAL\u003c/code\u003e prioritizes accuracy, calculating routes based on real-time traffic for the most precise ETAs, but may have higher latency.\u003c/p\u003e\n"],["\u003cp\u003eThe default setting is \u003ccode\u003eTRAFFIC_UNAWARE\u003c/code\u003e if no routing preference is specified using \u003ccode\u003eROUTING_PREFERENCE_UNSPECIFIED\u003c/code\u003e.\u003c/p\u003e\n"]]],["The document defines four routing preference values: `ROUTING_PREFERENCE_UNSPECIFIED` (defaulting to `TRAFFIC_UNAWARE`), `TRAFFIC_UNAWARE` (ignores live traffic, offering lowest latency and relying on average conditions), `TRAFFIC_AWARE` (considers live traffic with some latency optimizations), and `TRAFFIC_AWARE_OPTIMAL` (considers live traffic without optimizations, resulting in highest latency). When choosing routes with the drive or two-wheeler travel mode, only average time-independent conditions are considered, with possible inclusions of closed roads.\n"],null,["# RoutingPreference\n\nA set of values that specify factors to take into consideration when calculating the route.\n\n| Enums ||\n|----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `ROUTING_PREFERENCE_UNSPECIFIED` | No routing preference specified. Default to `TRAFFIC_UNAWARE`. |\n| `TRAFFIC_UNAWARE` | Computes routes without taking live traffic conditions into consideration. Suitable when traffic conditions don't matter or are not applicable. Using this value produces the lowest latency. Note: For [`RouteTravelMode`](/maps/documentation/routes/reference/rest/v2/RouteTravelMode) `DRIVE` and `TWO_WHEELER`, the route and duration chosen are based on road network and average time-independent traffic conditions, not current road conditions. Consequently, routes may include roads that are temporarily closed. Results for a given request may vary over time due to changes in the road network, updated average traffic conditions, and the distributed nature of the service. Results may also vary between nearly-equivalent routes at any time or frequency. |\n| `TRAFFIC_AWARE` | Calculates routes taking live traffic conditions into consideration. In contrast to `TRAFFIC_AWARE_OPTIMAL`, some optimizations are applied to significantly reduce latency. |\n| `TRAFFIC_AWARE_OPTIMAL` | Calculates the routes taking live traffic conditions into consideration, without applying most performance optimizations. Using this value produces the highest latency. |"]]