public class SuggestGeocoding
extends java.lang.Object
The Suggest Geocoding service encapsulates suggestGeocoding queries to cercalia API. The Suggest Geocoder works with an APIKEY. Use the following call to configure it:
Cercalia.getInstance().setCercaliaApiKey(API_KEY)
Resolution of the queries is done asyncronously, so a callback must be defined as in this example overriding the method:
SuggestGeocoding.getInstance().geocoding(address, new SuggestGeocoding.SuggestGeocodingCallback() {
@Override
public void suggestGeocodingResponse(@Nullable LatLng result, boolean error) {
...
}
});
Copyright (c) 2017 Nexusgeographics All rights reserved.
Cercalia
Modifier and Type | Class and Description |
---|---|
static interface |
SuggestGeocoding.SuggestGeocodingCallback
The interface Suggest geocoding callback.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancel the current query
|
void |
geocoding(Address address,
SuggestGeocoding.SuggestGeocodingCallback callback)
Geocoding.
|
void |
geocoding(java.lang.String cityCode,
java.lang.String streetCode,
java.lang.String houseNumber,
SuggestGeocoding.SuggestGeocodingCallback callback)
Geocoding.
|
static SuggestGeocoding |
getInstance()
Gets instance.
|
public static SuggestGeocoding getInstance()
public void geocoding(@Nullable java.lang.String cityCode, @Nullable java.lang.String streetCode, @Nullable java.lang.String houseNumber, @NonNull SuggestGeocoding.SuggestGeocodingCallback callback)
cityCode
- the city codestreetCode
- the street codehouseNumber
- the house numbercallback
- the callbackpublic void geocoding(@NonNull Address address, @NonNull SuggestGeocoding.SuggestGeocodingCallback callback)
address
- the addresscallback
- the callbackpublic void cancel()