Este producto o función tiene el estado de heredado. Para obtener más información sobre el estado de heredado y cómo migrar de los servicios heredados a los más nuevos, consulta
Productos y funciones heredados.
Bibliotecas cliente para los servicios web de Google Maps
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Las bibliotecas cliente de Java, Python, Go y Node.js para los servicios de Google Maps son bibliotecas de código abierto según la licencia Apache 2.0 que cuentan con asistencia de la comunidad. Es posible descargarlas y realizar contribuciones en GitHub, donde también encontrarás instrucciones de instalación y código de muestra:
¿Por qué usar las bibliotecas cliente?
Las bibliotecas cliente de Java, Python, Go y Node.js para los servicios de Google Maps te permiten trabajar con los servicios web de Google Maps en tu servidor.
Incluyen la funcionalidad de las siguientes API:
Además de la funcionalidad que proporcionan estas API, las bibliotecas cliente facilitan un poco algunas tareas comunes.
- Límite de frecuencia automático: De forma predeterminada, las solicitudes se envían según el límite de frecuencia previsto para cada servicio web. Puedes proporcionar límites de QPS personalizados con
new GeoApiContext().setQueryRateLimit(qps)
.
- Volver a intentar en caso de error: Las bibliotecas cliente volverán a intentar automáticamente cualquier solicitud si la API envía un error
5xx
. Los reintentos usan la retirada exponencial, que ayuda en caso de errores intermitentes.
- Autenticación sencilla: Las bibliotecas cliente facilitan la autenticación con tu clave de API gratuita. Los clientes del plan premium de Google Maps Platform pueden usar su ID y secreto de cliente.
- POJO: Las bibliotecas de Java muestran objetos nativos para cada una de las respuestas de la API. Las bibliotecas de Python muestran la estructura tal como se recibe de la API.
- Asíncrona o síncrona: Todas las solicitudes admiten un estilo de llamada síncrona o asíncrona.
Términos y Condiciones
Las bibliotecas cliente para los servicios web de Google Maps cuentan con la licencia Apache 2.0.
Las bibliotecas cliente son wrappers para los servicios web de Google Maps. Estos servicios se rigen por las Condiciones del Servicio de Google Maps Platform.
Importante: Estas bibliotecas no se contemplan en la política de baja ni en el acuerdo de asistencia estándares de Google.
ID de cliente y claves de API
Cada servicio web de Google Maps requiere una clave de API o un ID de cliente. Si deseas obtener información sobre cuándo usar una clave de API o un ID de cliente y cómo obtenerlos, consulta la guía de autenticación de la API que estés usando:
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2023-09-20 (UTC)
[null,null,["Última actualización: 2023-09-20 (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, under the Apache 2.0 License, simplify development with features such as automatic rate limiting, retry mechanisms, and easy authentication.\u003c/p\u003e\n"],["\u003cp\u003eClient libraries provide synchronous and asynchronous calling styles while adhering to the Google Maps Platform Terms of Service.\u003c/p\u003e\n"],["\u003cp\u003eThey are not covered by Google's standard deprecation policy or support agreement and require an API key or client ID for usage, obtainable through API-specific authentication guides.\u003c/p\u003e\n"]]],["Community-supported Java, Python, Go, and Node.js client libraries for Google Maps Services are available on GitHub under the Apache 2.0 License. These clients wrap APIs like Address Validation, Directions, and Places, offering features such as automatic rate limiting, retry on failure, and easy authentication via API keys or client IDs. They facilitate server-side interaction with Google Maps web services. The libraries support both synchronous and asynchronous requests.\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)"]]