Routes API
เส้นทางนี้.googleapis.com API
บริการ: Routes.googleapis.com
หากต้องการเรียกใช้บริการนี้ เราขอแนะนำให้ใช้ไลบรารีของไคลเอ็นต์ที่ Google มีให้ หากแอปพลิเคชันของคุณจำเป็นต้องใช้ไลบรารีของคุณเองเพื่อเรียกใช้บริการนี้ ให้ใช้ข้อมูลต่อไปนี้เมื่อคุณส่งคำขอ API
เอกสารการค้นพบ
เอกสารการค้นพบเป็นข้อกำหนดที่เครื่องอ่านได้เพื่ออธิบายและใช้ REST API ใช้สำหรับสร้างไลบรารีไคลเอ็นต์, ปลั๊กอิน IDE และเครื่องมืออื่นๆ ที่โต้ตอบกับ Google APIs บริการเดียวอาจมีเอกสารการค้นพบหลายรายการ บริการนี้มีเอกสารการค้นพบต่อไปนี้
ปลายทางบริการ
ปลายทางของบริการคือ URL พื้นฐานที่ระบุที่อยู่เครือข่ายของบริการ API บริการหนึ่งอาจมีปลายทางบริการหลายจุด บริการนี้มีปลายทางบริการต่อไปนี้และ URI ด้านล่างทั้งหมดเกี่ยวข้องกับปลายทางของบริการนี้
https://routes.googleapis.com
ทรัพยากร REST: v2
วิธีการ |
computeRouteMatrix |
POST /distanceMatrix/v2:computeRouteMatrix
สร้างรายการต้นทางและปลายทาง แล้วแสดงผลสตรีมที่มีข้อมูลเส้นทางสำหรับชุดค่าผสมของต้นทางและปลายทางแต่ละรายการ |
computeRoutes |
POST /directions/v2:computeRoutes
แสดงผลเส้นทางหลักพร้อมกับเส้นทางเลือกเพิ่มเติม โดยพิจารณาจากชุดปลายทางและจุดระหว่างทาง |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-04-29 UTC
[null,null,["อัปเดตล่าสุด 2025-04-29 UTC"],[[["The Routes API provides access to functionalities for calculating distances and routes using the Google Maps platform."],["Developers can interact with the API using Google-provided client libraries or by directly making RESTful API requests."],["Two core methods offered are `computeRouteMatrix` for calculating distances between multiple origins and destinations, and `computeRoutes` for generating detailed route information."],["The API utilizes a RESTful architecture and documentation is available through a discovery document."],["The service endpoint for the Routes API is `https://routes.googleapis.com`."]]],["The routes.googleapis.com API offers two primary methods: `computeRouteMatrix` and `computeRoutes`. `computeRouteMatrix` takes a list of origins and destinations, outputting route data for each combination. `computeRoutes` calculates the primary route and optional alternatives between specified waypoints. The service endpoint is `https://routes.googleapis.com`, and a discovery document is available at `https://routes.googleapis.com/$discovery/rest?version=v2` to facilitate building client tools. Google-provided client libraries are recommended.\n"]]