ขณะนี้
เส้นทาง API ที่ต้องการมีให้บริการเฉพาะลูกค้าบางรายเท่านั้น
ติดต่อฝ่ายขายเพื่อดูข้อมูลเพิ่มเติม
Routes Preferred API
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
บริการ: เส้นทางนี้ต้องการ.googleapis.com
หากต้องการเรียกใช้บริการนี้ เราขอแนะนำให้คุณใช้ไลบรารีของไคลเอ็นต์ที่ Google จัดเตรียมไว้ให้ หากแอปพลิเคชันของคุณต้องใช้ไลบรารีของคุณเองเพื่อเรียกใช้บริการนี้ ให้ใช้ข้อมูลต่อไปนี้เมื่อคุณส่งคำขอ API
เอกสารการค้นพบ
เอกสารการค้นพบเป็นข้อกำหนดที่เครื่องอ่านได้สำหรับการอธิบายและใช้ REST API โดยใช้เพื่อสร้างไลบรารีของไคลเอ็นต์, ปลั๊กอิน IDE และเครื่องมืออื่นๆ ที่โต้ตอบกับ Google APIs บริการเดียวอาจมีเอกสารการค้นพบได้หลายรายการ บริการนี้มีเอกสารการค้นพบต่อไปนี้
ปลายทางบริการ
ปลายทางบริการคือ URL ฐานที่ระบุที่อยู่เครือข่ายของบริการ API บริการหนึ่งอาจมีปลายทางบริการหลายปลายทาง บริการนี้มีปลายทางบริการต่อไปนี้และ URI ด้านล่างทั้งหมดจะเกี่ยวข้องกับปลายทางของบริการนี้
https://routespreferred.googleapis.com
ทรัพยากร REST: v1alpha
วิธีการ |
computeCustomRoutes |
POST /v1alpha:computeCustomRoutes
จะคำนวณเส้นทางที่ดีที่สุดสำหรับวัตถุประสงค์ของเส้นทางโดยใช้ชุดจุดอ้างอิงและจุดระหว่างกลาง ตลอดจนวัตถุประสงค์ของเส้นทาง |
computeRouteMatrix |
POST /v1alpha:computeRouteMatrix
สร้างรายการต้นทางและปลายทาง แล้วแสดงผลสตรีมที่มีข้อมูลเส้นทางสำหรับชุดค่าผสมของต้นทางและปลายทางแต่ละรายการ |
computeRoutes |
POST /v1alpha:computeRoutes
แสดงผลเส้นทางหลักพร้อมกับเส้นทางทางเลือกทางเลือก ซึ่งระบุชุดของจุดอ้างอิงและจุดระหว่างกลาง |
ทรัพยากร REST: v1
วิธีการ |
computeCustomRoutes |
POST /v1:computeCustomRoutes
จะคำนวณเส้นทางที่ดีที่สุดสำหรับวัตถุประสงค์ของเส้นทางโดยใช้ชุดจุดอ้างอิงและจุดระหว่างกลาง ตลอดจนวัตถุประสงค์ของเส้นทาง |
computeRouteMatrix |
POST /v1:computeRouteMatrix
สร้างรายการต้นทางและปลายทาง แล้วแสดงผลสตรีมที่มีข้อมูลเส้นทางสำหรับชุดค่าผสมของต้นทางและปลายทางแต่ละรายการ |
computeRoutes |
POST /v1:computeRoutes
แสดงผลเส้นทางหลักพร้อมกับเส้นทางทางเลือกทางเลือก ซึ่งระบุชุดของจุดอ้างอิงและจุดระหว่างกลาง |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eThe Routes Preferred API service, \u003ccode\u003eroutespreferred.googleapis.com\u003c/code\u003e, helps developers compute optimal routes and route matrices based on given waypoints and objectives.\u003c/p\u003e\n"],["\u003cp\u003eThe service offers two versions: \u003ccode\u003ev1alpha\u003c/code\u003e and \u003ccode\u003ev1\u003c/code\u003e, each supporting methods like \u003ccode\u003ecomputeCustomRoutes\u003c/code\u003e, \u003ccode\u003ecomputeRouteMatrix\u003c/code\u003e, and \u003ccode\u003ecomputeRoutes\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eClient libraries are recommended for interacting with the service, but developers can also use the provided discovery documents and service endpoint for custom integration.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ecomputeCustomRoutes\u003c/code\u003e allows developers to define route objectives and receive tailored route recommendations, while \u003ccode\u003ecomputeRoutes\u003c/code\u003e provides primary and alternate routes for standard navigation.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ecomputeRouteMatrix\u003c/code\u003e facilitates the calculation of route information for multiple origin-destination pairs, enabling efficient analysis of travel times and distances.\u003c/p\u003e\n"]]],["The `routespreferred.googleapis.com` service offers two REST resources, `v1alpha` and `v1`, accessible via the `https://routespreferred.googleapis.com` endpoint. Both versions support three `POST` methods: `computeCustomRoutes` to calculate the best route based on waypoints and objectives, `computeRouteMatrix` to retrieve route information for multiple origin-destination pairs, and `computeRoutes` to return primary and optional alternate routes between waypoints. The service provides discovery documents for each version.\n"],null,["# Routes Preferred API\n\n- [REST Resource: v1alpha](#v1alpha)\n- [REST Resource: v1](#v1)\n\nService: routespreferred.googleapis.com\n---------------------------------------\n\nTo call this service, we recommend that you use the Google-provided [client libraries](https://cloud.google.com/apis/docs/client-libraries-explained). If your application needs to use your own libraries to call this service, use the following information when you make the API requests.\n\n### Discovery document\n\nA [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery documents:\n\n- \u003chttps://routespreferred.googleapis.com/$discovery/rest?version=v1\u003e\n- \u003chttps://routespreferred.googleapis.com/$discovery/rest?version=v1alpha\u003e\n\n### Service endpoint\n\nA [service endpoint](https://cloud.google.com/apis/design/glossary#api_service_endpoint) is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:\n\n- `https://routespreferred.googleapis.com`\n\nREST Resource: [v1alpha](/maps/documentation/routes_preferred/reference/rest/v1alpha/TopLevel)\n----------------------------------------------------------------------------------------------\n\n| Methods ||\n|-----------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [computeCustomRoutes](/maps/documentation/routes_preferred/reference/rest/v1alpha/TopLevel/computeCustomRoutes) | `POST /v1alpha:computeCustomRoutes` Given a set of terminal and intermediate waypoints, and a route objective, computes the best route for the route objective. |\n| [computeRouteMatrix](/maps/documentation/routes_preferred/reference/rest/v1alpha/TopLevel/computeRouteMatrix) | `POST /v1alpha:computeRouteMatrix` Takes in a list of origins and destinations and returns a stream containing route information for each combination of origin and destination. |\n| [computeRoutes](/maps/documentation/routes_preferred/reference/rest/v1alpha/TopLevel/computeRoutes) | `POST /v1alpha:computeRoutes` Returns the primary route along with optional alternate routes, given a set of terminal and intermediate waypoints. |\n\nREST Resource: [v1](/maps/documentation/routes_preferred/reference/rest/v1/TopLevel)\n------------------------------------------------------------------------------------\n\n| Methods ||\n|------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [computeCustomRoutes](/maps/documentation/routes_preferred/reference/rest/v1/TopLevel/computeCustomRoutes) | `POST /v1:computeCustomRoutes` Given a set of terminal and intermediate waypoints, and a route objective, computes the best route for the route objective. |\n| [computeRouteMatrix](/maps/documentation/routes_preferred/reference/rest/v1/TopLevel/computeRouteMatrix) | `POST /v1:computeRouteMatrix` Takes in a list of origins and destinations and returns a stream containing route information for each combination of origin and destination. |\n| [computeRoutes](/maps/documentation/routes_preferred/reference/rest/v1/TopLevel/computeRoutes) | `POST /v1:computeRoutes` Returns the primary route along with optional alternate routes, given a set of terminal and intermediate waypoints. |"]]