Google 地圖網路服務適用的用戶端程式庫
Google 地圖服務適用的 Java、Python、Go 和 Node.js 用戶端都是社群支援的用戶端程式庫,並依據阿帕契 2.0 授權的條款提供開放原始碼。您可以到 GitHub 下載這些用戶端或相關貢獻項目、查看安裝操作說明及取得程式碼範例:
使用用戶端程式庫的好處
Google 地圖服務適用的 Java 用戶端、Python 用戶端、Go 用戶端和 Node.js 用戶端,都可讓您在自家伺服器上使用 Google 地圖網路服務。這些用戶端內含下列 API 的功能:
除了這些 API 提供的功能,用戶端程式庫還能讓一些常見的工作變得更簡單一些。
- 自動頻率限制:根據預設,系統會按照各個網路服務的預期頻率限制傳送要求,您可以自訂 QPM 限制
new GeoApiContext().setQueryRateLimit(qpm)
。
- 失敗時重試:若 API 傳送
5xx
錯誤,用戶端程式庫會自動重試任何要求,並在重試時使用指數倒退演算法,這對於失敗是間斷出現的情況很有幫助。
- 輕鬆驗證:用戶端程式庫有助於簡化驗證作業
換成您的 API 金鑰。
- POJO:Java 程式庫會針對每一個 API 回應傳回原生物件,Python 程式庫則會原封不動地傳回從 API 收到的架構。
- 非同步或同步:所有的要求都支援同步或非同步呼叫樣式。
條款及細則
Google 地圖網路服務的用戶端程式庫是依阿帕契 2.0 授權的條款進行授權。
用戶端程式庫是 Google 地圖網路服務的包裝函式;Google 地圖網路服務受到《Google 地圖平台服務條款》的規範。
重要注意事項:這些程式庫不在標準 Google 廢止政策或支援協議的涵蓋範圍內。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-16 (世界標準時間)。
[null,null,["上次更新時間:2024-08-16 (世界標準時間)。"],[[["Community-supported client libraries for Java, Python, Go, and Node.js are available for Google Maps Services, offering convenient access to various APIs like Directions, Distance Matrix, and Geocoding."],["These open-source libraries, under the Apache 2.0 License, provide features like automatic rate limiting, retry on failure, easy authentication, and support for both synchronous and asynchronous calls."],["While the libraries are licensed under Apache 2.0, the underlying Google Maps web services are governed by the Google Maps Platform Terms of Service and are not covered by standard Google deprecation policies or support agreements."],["The client libraries are accessible on GitHub, along with installation instructions and sample code, empowering developers to integrate Google Maps functionality into their server-side applications."]]],[]]