Librerie client per i servizi web di Google Maps
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Il client Java, il client Python, il client Go e il client Node.js per i servizi Google Maps sono librerie client supportate dalla community, open source ai sensi della licenza Apache 2.0. Sono disponibili per il download e i contributi su GitHub, dove troverai anche le istruzioni di installazione e il codice di esempio:
Perché utilizzare le librerie client?
Il client Java, il client Python, il client Go
e il client Node.js per i servizi Google Maps ti consentono di utilizzare i web service Google Maps sul tuo server.
Includono le funzionalità delle seguenti API:
Oltre alle funzionalità fornite da queste API, le librerie client semplificano alcune attività comuni.
- Limitazione automatica della frequenza Per impostazione predefinita, le richieste vengono inviate con la frequenza prevista per ogni servizio web. Puoi fornire limiti QPM personalizzati con
new GeoApiContext().setQueryRateLimit(qpm)
.
- Riprova in caso di errore: le librerie client riproveranno automaticamente qualsiasi richiesta se l'API invia un errore
5xx
. I nuovi tentativi utilizzano il backoff esponenziale,
che è utile in caso di errori intermittenti.
- Autenticazione facile: le librerie client semplificano l'autenticazione con la tua chiave API disponibile senza costi. I clienti del piano Premium di Google Maps Platform possono utilizzare il proprio ID client e il proprio segreto.
- POJO: le librerie Java restituiscono oggetti nativi per ciascuna delle risposte dell'API. Le librerie Python restituiscono la struttura così come viene ricevuta dall'API.
- Asincrone o sincrona Tutte le richieste supportano lo stile di chiamata sincrono o asincrono.
Termini e condizioni
Le librerie client per i servizi web di Google Maps sono concesse in licenza ai sensi della licenza Apache 2.0.
Le librerie client sono wrapper per i servizi web di Google Maps. I servizi web di Google Maps sono regolati dai Termini di servizio di Google Maps Platform.
Importante: queste librerie non sono coperte
dalle norme standard di ritiro o dal contratto di assistenza di Google.
Chiavi API e ID client
Ogni servizio web di Google Maps richiede una chiave API o un ID cliente. Per una guida su quando utilizzare una chiave API, quando utilizzare un ID client e come ottenere la chiave API o l'ID client, consulta la guida all'autenticazione per l'API che stai utilizzando:
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-08-31 UTC.
[null,null,["Ultimo aggiornamento 2025-08-31 UTC."],[[["\u003cp\u003eCommunity-supported client libraries for Google Maps Services are available in Java, Python, Go, and Node.js, offering convenient access to various Google Maps APIs like Directions, Geocoding, and Places.\u003c/p\u003e\n"],["\u003cp\u003eThese open-source libraries, licensed under Apache 2.0, provide features such as automatic rate limiting, retry on failure, and simplified authentication.\u003c/p\u003e\n"],["\u003cp\u003eClient libraries are accessible on GitHub with installation instructions and sample code, enabling developers to integrate Google Maps web services into their server-side applications.\u003c/p\u003e\n"],["\u003cp\u003eUsage is governed by the Google Maps Platform Terms of Service, and these libraries are not covered by standard Google deprecation policies or support agreements.\u003c/p\u003e\n"],["\u003cp\u003eAPI keys or client IDs are required for each Google Maps web service, with specific authentication guides available for each API.\u003c/p\u003e\n"]]],[],null,["# Client Libraries for Google Maps Web Services\n\nThe Java Client, Python Client, Go Client and\nNode.js Client for Google Maps Services are community supported client libraries, open sourced under the\n[Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0). They are\navailable for download and contributions on GitHub, where you will also find installation\ninstructions and sample code: \n\n- [Java Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-java)\n- [Python Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-python)\n- [Go Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-go)\n- [Node.js Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-js)\n\nWhy use the client libraries?\n-----------------------------\n\nThe Java Client, Python Client, Go Client\nand Node.js Client for Google Maps Services enable you to work with Google Maps web services on your server.\nThey wrap the functionality of the following APIs:\n\n- [Address Validation API](/maps/documentation/address-validation/overview)\n- [Directions API (Legacy)](/maps/documentation/directions/start)\n- [Distance Matrix API (Legacy)](/maps/documentation/distancematrix/start)\n- [Elevation API](/maps/documentation/elevation/start)\n- [Geocoding API](/maps/documentation/geocoding/start)\n- [Places API](/maps/documentation/places/web-service/overview)\n- [Roads API](/maps/documentation/roads/overview)\n- [Time Zone API](/maps/documentation/timezone/start)\n\nIn addition to the functionality provided by these APIs, the client libraries\nmake some common tasks a little easier.\n\n- **Automatic Rate Limiting** By default, requests are sent at the expected rate limit for each web service. You can provide custom QPM limits with `new GeoApiContext().setQueryRateLimit(qpm)`.\n- **Retry on Failure** The client libraries will automatically retry any request if the API sends a `5xx` error. Retries use exponential back-off, which helps in the event of intermittent failures.\n- **Easy Authentication** The client libraries make it easy to authenticate with your freely available API Key. [Google Maps Platform Premium Plan](/maps/premium) customers can use their [client ID and secret](/maps/premium/overview#client-id).\n- **POJOs** The Java libraries return native objects for each of the API responses. The Python libraries return the structure as it is received from the API.\n- **Asynchronous or synchronous** All requests support synchronous or asynchronous calling style.\n\nTerms and conditions\n--------------------\n\nThe client libraries for the Google Maps web services are licensed under the\n[Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0).\n\nThe client libraries are wrappers for the Google Maps web services. The Google Maps\nweb services are governed by the [Google Maps Platform Terms of Service](https://cloud.google.com/maps-platform/terms).\n\n**Important** : These libraries are **not covered**\nby the standard Google deprecation policy or support agreement.\n\nAPI keys and client IDs\n-----------------------\n\nEach Google Maps web service requires an API key or client ID. For a guide on\nwhen to use an API key, when to use a client ID, and how to get hold of your\nAPI key or client ID, see the authentication guide for the API you're using:\n\n- [Address Validation API](/maps/documentation/address-validation/get-api-key)\n- [Directions API (Legacy)](/maps/documentation/directions/get-api-key)\n- [Distance Matrix API (Legacy)](/maps/documentation/distancematrix/get-api-key)\n- [Elevation API](/maps/documentation/elevation/get-api-key)\n- [Geocoding API](/maps/documentation/geocoding/get-api-key)\n- [Places API](/maps/documentation/places/web-service/get-api-key)\n- [Roads API](/maps/documentation/roads/get-api-key)\n- [Time Zone API](/maps/documentation/timezone/get-api-key)"]]