FallbackInfo
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Informacje o tym, jak i dlaczego został użyty wynik kreacji zastępczej. Jeśli to pole jest ustawione, oznacza to, że serwer jako awaryjny użył innego trybu routingu niż preferowany.
Pola |
routingMode |
enum (FallbackRoutingMode )
Tryb routingu używany w odpowiedzi. Jeśli aktywowano działanie kreacji zastępczej, tryb może się różnić od ustawienia routingu ustawionego w pierwotnym żądaniu klienta.
|
reason |
enum (FallbackReason )
Powód, dla którego użyto odpowiedzi zastępczej zamiast pierwotnej odpowiedzi. To pole jest wypełniane tylko po uruchomieniu trybu kreacji zastępczej i zwrocie odpowiedzi zastępczej.
|
FallbackRoutingMode
Rzeczywisty tryb routingu używany w przypadku zwróconej odpowiedzi zastępczej.
Wartości w polu enum |
FALLBACK_ROUTING_MODE_UNSPECIFIED |
Nieużywane. |
FALLBACK_TRAFFIC_UNAWARE |
Wskazuje, że do obliczenia odpowiedzi użyto elementu RoutingPreference typu TRAFFIC_UNAWARE . |
FALLBACK_TRAFFIC_AWARE |
Wskazuje, że do obliczenia odpowiedzi użyto elementu RoutingPreference typu TRAFFIC_AWARE . |
FallbackReason
Powody używania odpowiedzi zastępczej.
Wartości w polu enum |
FALLBACK_REASON_UNSPECIFIED |
Nie określono przyczyny kreacji zastępczej. |
SERVER_ERROR |
Podczas obliczania trasy w preferowanym trybie routingu wystąpił błąd serwera, ale udało nam się zwrócić wynik obliczony przez inny tryb. |
LATENCY_EXCEEDED |
Nie udało nam się na czas ukończyć obliczeń przy użyciu preferowanego trybu routingu, ale udało nam się zwrócić wynik obliczony w innym trybie. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-08-31 UTC.
[null,null,["Ostatnia aktualizacja: 2025-08-31 UTC."],[[["\u003cp\u003eFallbackInfo provides details on why and how a fallback routing result was used if the server deviated from the preferred routing mode.\u003c/p\u003e\n"],["\u003cp\u003eThis information includes the actual routing mode used (FallbackRoutingMode) and the reason for the fallback (FallbackReason).\u003c/p\u003e\n"],["\u003cp\u003eFallbackRoutingMode specifies whether traffic conditions were considered in the fallback route (TRAFFIC_AWARE or TRAFFIC_UNAWARE).\u003c/p\u003e\n"],["\u003cp\u003eFallbackReason clarifies if the fallback was due to a server error or exceeding the allowed calculation time.\u003c/p\u003e\n"]]],["The server may use a fallback routing mode if the preferred mode fails. This fallback information is provided in JSON format, including the `routingMode` used and the `reason` for the fallback. The `routingMode` can be `FALLBACK_TRAFFIC_UNAWARE` or `FALLBACK_TRAFFIC_AWARE`. The `reason` can be `SERVER_ERROR` (due to an internal error) or `LATENCY_EXCEEDED` (calculation exceeded the allowed time). Specific enumerations define the exact fallback mode and reason used.\n"],null,["# FallbackInfo\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [FallbackRoutingMode](#FallbackRoutingMode)\n- [FallbackReason](#FallbackReason)\n\nInformation related to how and why a fallback result was used. If this field is set, then it means the server used a different routing mode from your preferred mode as fallback.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"routingMode\": enum (/maps/documentation/routes/reference/rest/v2/FallbackInfo#FallbackRoutingMode), \"reason\": enum (/maps/documentation/routes/reference/rest/v2/FallbackInfo#FallbackReason) } ``` |\n\n| Fields ||\n|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `routingMode` | `enum (`[FallbackRoutingMode](/maps/documentation/routes/reference/rest/v2/FallbackInfo#FallbackRoutingMode)`)` Routing mode used for the response. If fallback was triggered, the mode may be different from routing preference set in the original client request. |\n| `reason` | `enum (`[FallbackReason](/maps/documentation/routes/reference/rest/v2/FallbackInfo#FallbackReason)`)` The reason why fallback response was used instead of the original response. This field is only populated when the fallback mode is triggered and the fallback response is returned. |\n\nFallbackRoutingMode\n-------------------\n\nActual routing mode used for returned fallback response.\n\n| Enums ||\n|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `FALLBACK_ROUTING_MODE_UNSPECIFIED` | Not used. |\n| `FALLBACK_TRAFFIC_UNAWARE` | Indicates the `TRAFFIC_UNAWARE` [`RoutingPreference`](/maps/documentation/routes/reference/rest/v2/RoutingPreference) was used to compute the response. |\n| `FALLBACK_TRAFFIC_AWARE` | Indicates the `TRAFFIC_AWARE` [`RoutingPreference`](/maps/documentation/routes/reference/rest/v2/RoutingPreference) was used to compute the response. |\n\nFallbackReason\n--------------\n\nReasons for using fallback response.\n\n| Enums ||\n|-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `FALLBACK_REASON_UNSPECIFIED` | No fallback reason specified. |\n| `SERVER_ERROR` | A server error happened while calculating routes with your preferred routing mode, but we were able to return a result calculated by an alternative mode. |\n| `LATENCY_EXCEEDED` | We were not able to finish the calculation with your preferred routing mode on time, but we were able to return a result calculated by an alternative mode. |"]]