Skip to content

v1.1.1

Latest

Choose a tag to compare

@mygeocode mygeocode released this 24 Nov 14:39

First public release of the official Java client for the My Geocode API.

What it does

  • Forward and reverse geocoding, one at a time or up to 100 per request
  • Address autocomplete
  • IPv4 and IPv6 lookup, one at a time or up to 100 per request
  • Timezones for a point, a zone id or a list of points
  • Elevation for a point, a list of points, a path or a grid
  • Postal code lookup

Every parameter in the API documentation is an option, and each method has its own options class, so an option that
does not belong to a method does not compile. Results come back in English unless you set lang. Every method has an
...Async twin that returns a CompletableFuture. The client retries on 429, 500 and 503 with the waits the API asks
for, and every response carries its request id and your remaining quota.

You can start without a key: each network gets 2,500 free requests a day.

Requirements

  • Java 8 or newer, tested on every release from 8 to 27
  • No dependencies: only the JDK

Install

<dependency>
  <groupId>com.mygeocode</groupId>
  <artifactId>mygeocode</artifactId>
  <version>1.1.1</version>
</dependency>
Client client = Client.builder().build();
System.out.println(client.reverse(48.8584, 2.2945).getResult().getFormatted());
// 5 Avenue Anatole France, 75007 Paris, France

The README covers every method, option and result field.

Downloads

File What it is
mygeocode-1.1.1.jar The library. Put it on the class path; it is the only jar you need.
mygeocode-1.1.1-sources.jar The source code, for your IDE.
mygeocode-1.1.1-javadoc.jar The API documentation.
mygeocode-1.1.1.pom The Maven description of the library.
*.asc Signatures of the files above, made with the My Geocode signing key (fingerprint 1E36 485B A61A DCEC E5B4 FBA4 EE42 5A9D 1B2C 2FB7, on keyserver.ubuntu.com).
SHA256SUMS Checksums of the files above.
Source code (zip, tar.gz) The whole repository, added by GitHub.