RevGeocodeApi
OLS Client Reverse Geocode Search API
HERE Search - Reverse Geocoder returns the nearest address to known geo-coordinates, along with additional address and location details.
For the full GeocodeApi specification, see RevgeocodeApi.
The following pages describe the per-request configuration and metrics.
Example
val client = BaseClient()
val geocodeApi = client.of[RevgeocodeApi]
val result = geocodeApi.revgeocodeGet(Option("52.5308,13.3856")).executeToEntity()
result
.andThen {
case Success(response: OpenSearchReverseGeocodeResponse) =>
// do something with the geocodes
response.items.foreach(geocodes =>
geocodes.foreach(geocode => println(geocode.getTitle.get())))
case Failure(ex) =>
ex.printStackTrace()
}
Await.result(result, Duration.Inf)BaseClient client = BaseClientJava.instance();
RevgeocodeApi geocodeApi = new RevgeocodeApi(client);
OpenSearchReverseGeocodeResponse openSearchGeocodeResponse =
geocodeApi
.revgeocodeGet()
.withAt(Optional.of("52.5308,13.3856"))
.build()
.executeToEntity()
.toCompletableFuture()
.join();
// do something with the geocodes
openSearchGeocodeResponse
.getItems()
.ifPresent(list -> list.forEach(item -> item.getTitle().ifPresent(System.out::println)));Examples of responses can be found in the Developer Guide
Updated 21 days ago