Google Maps API Libraries for Java and Python
Written by Kay Ewbank   
Monday, 12 January 2015

Google has added free open source client libraries for Java and Python to the Google Maps API.

The API provides a set of web services that you can use to integrate maps into connected applications. Until now the only language supported was JavaScript via the JavaScript Maps API. However, the latest development makes similar facilities available for Java and Python.

 googleapisjavapython

 

As the blog post about the libraries says:

“the bottom line is fewer lines of code are needed to integrate the Maps APIs, and let's face it, less code means less work which means faster time to market!”

The libraries support several Maps API services, including:

  • Directions API
  • Distance Matrix API
  • Elevation API
  • Geocoding AP
  • Time Zone API

The blog post gives an example of how you'd use the Geocoding API with the Java client library:

GeoApiContext context = new GeoApiContext().
                        setApiKey("AIza...");
GeocodingResult[] results = GeocodingApi.geocode(
     context,
    "1600 Amphitheatre Parkway Mountain View,
     CA 94043").await();
System.out.println(
     results[0].formattedAddress);

The developers say that the advantages the libraries provide start with a simple interface that lets you start using them easily. The libraries support of authenticated requests means you are sheltered from the more troublesome parts of authentication keys and enterprise signing, and the fact the interfaces are in your host language means you don’t need any bridging code.

 

 

As explained by Alex Danilio in this introductory video, the libraries will retry connections on failure, and throttle the number of requests for rate limiting. You can choose whether to use an asynchronous or synchronous interface as both are supported.

The APIs are open source and code and examples are available on Github for both Java and Python

 

Banner


Quadrupedal Parkour
31/03/2024

What is it with robots and parkour? First Atlas and now ANYmal want to impress us with their prowess. For the roboticist, however, emulating the skills of free running can enhance the capabilities of  [ ... ]



Excel Spreadsheet - A Joke?
01/04/2024

No this isn't an April Fool's although in places it seems like one. It's a true account of how Williams Racing has suffered through reliance on an overgrown and outdated Microsoft Excel spreadsheet, l [ ... ]


More News

 

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Monday, 12 January 2015 )