FallbackInfo
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ข้อมูลเกี่ยวกับวิธีและเหตุผลในการใช้ผลการค้นหาสำรอง หากมีการตั้งค่าฟิลด์นี้ แสดงว่าเซิร์ฟเวอร์ใช้โหมดการกำหนดเส้นทางอื่นจากโหมดที่คุณต้องการเป็นโหมดสำรอง
ช่อง |
routingMode |
enum (FallbackRoutingMode )
โหมดการกำหนดเส้นทางที่ใช้สำหรับการตอบกลับ หากมีการทริกเกอร์ทางเลือกไว้ โหมดอาจแตกต่างจากค่ากำหนดการกำหนดเส้นทางที่ตั้งไว้ในคำขอเดิมของไคลเอ็นต์
|
reason |
enum (FallbackReason )
เหตุผลที่มีการใช้การตอบกลับสำรองแทนการตอบกลับเดิม ช่องนี้จะป็อปปูเลตเมื่อมีการทริกเกอร์โหมดสำรองและแสดงผลการตอบสนองสำรอง
|
FallbackRoutingMode
โหมดการกำหนดเส้นทางจริงที่ใช้สำหรับการตอบสนองสำรองที่ส่งคืน
Enum |
FALLBACK_ROUTING_MODE_UNSPECIFIED |
ไม่ใช้ |
FALLBACK_TRAFFIC_UNAWARE |
บ่งบอกว่ามีการใช้ RoutingPreference ของ TRAFFIC_UNAWARE เพื่อคำนวณคำตอบ |
FALLBACK_TRAFFIC_AWARE |
บ่งบอกว่ามีการใช้ RoutingPreference ของ TRAFFIC_AWARE เพื่อคำนวณคำตอบ |
FallbackReason
เหตุผลในการใช้การตอบกลับสำรอง
Enum |
FALLBACK_REASON_UNSPECIFIED |
ไม่ได้ระบุเหตุผลสำรอง |
SERVER_ERROR |
เกิดข้อผิดพลาดของเซิร์ฟเวอร์ขณะคำนวณเส้นทางด้วยโหมดการกำหนดเส้นทางที่ต้องการ แต่เราสามารถส่งคืนผลลัพธ์ที่คำนวณจากโหมดอื่น |
LATENCY_EXCEEDED |
เราไม่สามารถคำนวณด้วยโหมดการกำหนดเส้นทางที่คุณต้องการให้เสร็จสิ้นได้ทันเวลา แต่เราส่งคืนผลลัพธ์ที่คำนวณโดยใช้โหมดอื่นได้ |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-31 UTC
[null,null,["อัปเดตล่าสุด 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. |"]]