public class

OSMOfflineReverseGeocodingService

extends ReverseGeocodingService
java.lang.Object
   ↳ com.carto.geocoding.ReverseGeocodingService
     ↳ com.carto.geocoding.OSMOfflineReverseGeocodingService

Class Overview

A reverse geocoding service that uses custom geocoding database files.
Note: this class is experimental and may change or even be removed in future SDK versions.

Summary

Public Constructors
OSMOfflineReverseGeocodingService(String path)
Constructs a new instance of the OSMOfflineReverseGeocodingService given path to the geocoding database.
Public Methods
GeocodingResultVector calculateAddresses(ReverseGeocodingRequest request)
Calculates matching addresses from the specified reverse geocoding request.
synchronized void delete()
String getLanguage()
Returns the language of the expected results.
void setLanguage(String lang)
Sets the language of the expected results.
[Expand]
Inherited Methods
From class com.carto.geocoding.ReverseGeocodingService
From class java.lang.Object

Public Constructors

public OSMOfflineReverseGeocodingService (String path)

Constructs a new instance of the OSMOfflineReverseGeocodingService given path to the geocoding database.

Parameters
path The full path to the geocoding database file.
Throws
Exception If the database file could not be opened or read.
IOException

Public Methods

public GeocodingResultVector calculateAddresses (ReverseGeocodingRequest request)

Calculates matching addresses from the specified reverse geocoding request.

Parameters
request The reverse geocoding request to use.
Returns
  • The list of matching geocoding results, sorted by descending ranks.
Throws
IOException

public synchronized void delete ()

public String getLanguage ()

Returns the language of the expected results.

Returns
  • The language of the expected results. As ISO 639-1 code or empty string.

public void setLanguage (String lang)

Sets the language of the expected results.

Parameters
lang The language to use as ISO 639-1 code. Empty string can be used for default language.