Package com.massifmaps.geocoding
Class MultiOSMOfflineReverseGeocodingService
java.lang.Object
com.massifmaps.geocoding.ReverseGeocodingService
com.massifmaps.geocoding.MultiOSMOfflineReverseGeocodingService
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.
Note: this class is experimental and may change or even be removed in future SDK versions.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new instance of the MultiOSMOfflineReverseGeocodingService given package manager instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new database.Calculates matching addresses from the specified reverse geocoding request.Returns the language of the expected results.booleanRemoves a database.voidsetLanguage(String lang) Sets the language of the expected results.
-
Constructor Details
-
MultiOSMOfflineReverseGeocodingService
Constructs a new instance of the MultiOSMOfflineReverseGeocodingService given package manager instance.- Throws:
IOException
-
-
Method Details
-
getLanguage
Description copied from class:ReverseGeocodingServiceReturns the language of the expected results.- Overrides:
getLanguagein classReverseGeocodingService- Returns:
- The language of the expected results. As ISO 639-1 code or empty string.
-
setLanguage
Description copied from class:ReverseGeocodingServiceSets the language of the expected results.- Overrides:
setLanguagein classReverseGeocodingService- Parameters:
lang- The language to use as ISO 639-1 code. Empty string can be used for default language.
-
calculateAddresses
Description copied from class:ReverseGeocodingServiceCalculates matching addresses from the specified reverse geocoding request.- Overrides:
calculateAddressesin classReverseGeocodingService- Parameters:
request- The reverse geocoding request to use.- Returns:
- The list of matching geocoding results, sorted by descending ranks.
- Throws:
IOException
-
add
Adds a new database.- Parameters:
database- The database file patht to be added.
-
remove
Removes a database.- Parameters:
database- The database file patht to be removed.- Returns:
- True if the database was removed. False otherwise ( database was not found).
-