[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-27 UTC。"],[[["\u003cp\u003eThe Routes API offers three traffic preferences: \u003ccode\u003eTRAFFIC_UNAWARE\u003c/code\u003e for fastest response, \u003ccode\u003eTRAFFIC_AWARE\u003c/code\u003e for balanced accuracy and speed, and \u003ccode\u003eTRAFFIC_AWARE_OPTIMAL\u003c/code\u003e for the most accurate results with higher latency.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTRAFFIC_UNAWARE\u003c/code\u003e uses average traffic conditions and is suitable for scenarios where speed is prioritized over accuracy.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTRAFFIC_AWARE\u003c/code\u003e considers real-time traffic but applies optimizations for faster responses.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTRAFFIC_AWARE_OPTIMAL\u003c/code\u003e performs an exhaustive search for the best route based on live traffic, similar to Google Maps, but results in higher latency.\u003c/p\u003e\n"],["\u003cp\u003eDeparture time can be set for \u003ccode\u003eTRAFFIC_AWARE\u003c/code\u003e and \u003ccode\u003eTRAFFIC_AWARE_OPTIMAL\u003c/code\u003e to influence how live and historical traffic conditions are weighed.\u003c/p\u003e\n"]]],[],null,["# Set the level of traffic data\n\n**European Economic Area (EEA) developers** If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](/maps/comms/eea/faq).\n\nThe traffic preferences you select balance the accuracy of the route details\nwith request performance in one of two ways:\n\n- **Traffic aware** -- Return the most accurate results possible (higher\n latency).\n\n- **Traffic unaware** -- Return the results as quickly as possible (lowest\n latency).\n\nWhen you make a request, weigh whether it is better to return the most accurate\nresults possible, or to return results as quickly as possible. The\nRoutes API provides options that let you control the quality of the\nresponse data versus the latency of the response.\n\nHow to set the traffic level\n----------------------------\n\nThe Routes API provides\n[RoutingPreference](/maps/documentation/routes/reference/rest/v2/RoutingPreference) (REST) and\n[RoutingPreference](/maps/documentation/routes/reference/rpc/google.maps.routing.v2#routingpreference)\n(gRPC) that let you specify routing preferences for calculating routes.\n\nThe default is traffic unaware results. You select traffic options with the\n`TRAFFIC_UNAWARE`, `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing\npreferences. Each routing preference produces results that differ in route\nquality, estimated ETA, and response latency.\n| **Caution:** Requests using `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` are billed at a higher rate. [Learn more about billing](/maps/documentation/routes/usage-and-billing).\n\n### Traffic conditions\n\nTraffic conditions characterize the rate of traffic flow:\n\n- **Normal traffic**: No congestion with traffic flowing at a normal speed.\n\n- **Light to moderate traffic**: Increasing congestion, with traffic flowing\n at a reduced speed.\n\n- **Heavy traffic**: Severe congestion, with heavily reduced traffic speed.\n\n### Traffic unaware\n\n`TRAFFIC_UNAWARE` is the default setting. Use this routing preference when you\nwant responses returned the quickest, and approximate routing details are good\nenough.\n\n`TRAFFIC_UNAWARE` routes are calculated without accounting for current traffic\nconditions. This routing preference results in the fastest request response\n(lowest latency).\n\nIf you choose `TRAFFIC_UNAWARE`,\nthe route and duration chosen are based on road network and average time-independent\ntraffic conditions, not current road conditions. Consequently, routes may include roads\nthat are temporarily closed. Results for a given request may vary over time\ndue to changes in the road network, updated average traffic conditions,\nand the distributed nature of the service. Results may also vary between\nnearly-equivalent routes at any time or frequency.\n\nHere are the responses you'll see:\n\n- `duration` - Contains the ETA for the route.\n\n- `staticDuration`: The ETA for the route considering only historical traffic\n information. For `TRAFFIC_UNAWARE`, this contains the same value as\n `duration`.\n\n### Traffic aware\n\nUse this routing preference when you want more accurate routing details than\n`TRAFFIC_UNAWARE`, and yet you don't mind if responses are returned with a\nmoderate increase in latency.\n\nWhen you set the `TRAFFIC_AWARE` routing preference, the service calculates the\nroute considering current traffic conditions. As a result, the route and route\ndetails more accurately reflect real-world conditions. Because this increase in\ndata quality comes at the expense of response latency, performance optimizations\nare applied to reduce much of the latency.\n\nHere are the responses you'll see:\n\n- `duration`: The ETA considering real-time traffic information.\n\n- `staticDuration` The ETA for the route considering only historical traffic\n information.\n\n### Traffic aware optimal\n\nUse this routing preference when you want results of the highest quality without\nregard to how long responses take. This routing preference has the longest delay\nin returning responses (highest latency).\n\nWhen you set the `TRAFFIC_AWARE_OPTIMAL` routing preference, the service\ncalculates the route considering current traffic conditions, but doesn't apply\nperformance optimizations. In this mode, the server performs a more exhaustive\nsearch of the road network to find the optimal route.\n\nThe `TRAFFIC_AWARE_OPTIMAL` routing preference is equivalent to the mode used by\n[maps.google.com](https://www.google.com/maps) and by the\nGoogle Maps mobile app.\n\nWhen you use this option with Compute Route Matrix, the number of\nelements in a request (number of origins × number of destinations) cannot exceed\n\n1. For more on Compute Route Matrix limits, see [Compute a route\n matrix](/maps/documentation/routes/compute_route_matrix).\n\nHere are the responses you'll see:\n\n- `duration`: The ETA for the route considering real-time traffic information.\n\n- `staticDuration`: The ETA for the route considering only historical traffic\n information.\n\nSet departure time (optional)\n-----------------------------\n\nUse this property only for traffic aware requests where the departure time needs\nto be in the future. If you don't set the `departureTime` property, it defaults\nto the time that you make the request.\n\nUse the `departureTime` property along with the `TRAFFIC_AWARE` and\n`TRAFFIC_AWARE_OPTIMAL` options when you want to adjust the way the service\npredicts traffic when choosing a route.\n\n- `TRAFFIC_UNAWARE`: **Not recommended** because the choice of route and\n duration are based on the road network and average time-independent traffic\n conditions.\n\n- `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL`:\n **Recommended for departures happening in the near future** because these\n preferences take live traffic conditions into consideration. Live traffic\n becomes more important and relevant the closer the `departureTime` is to\n now. The farther ahead you set the departure time into the future, the more\n consideration is given to historical traffic conditions in selecting routes.\n\nExample: How to select traffic aware routing\n--------------------------------------------\n\nThe following JSON code demonstrates how to set the `TRAFFIC_AWARE_OPTIMAL`\nrouting preference in a request message entity body. \n\n```cplint\n{\n \"origin\":{\n \"location\":{\n \"latLng\":{\n \"latitude\":37.419734,\n \"longitude\":-122.0827784\n }\n }\n },\n \"destination\":{\n \"location\":{\n \"latLng\":{\n \"latitude\":37.417670,\n \"longitude\":-122.079595\n }\n }\n },\n \"travelMode\":\"DRIVE\",\n \"routingPreference\":\"TRAFFIC_AWARE_OPTIMAL\"\n}\n```\n\nConfigure traffic on polylines\n------------------------------\n\nThe Routes API lets you request information about traffic conditions\nalong a *traffic-aware polyline* . See\n[Request polylines](/maps/documentation/routes/traffic_on_polylines) for more information."]]