use of com.here.android.mpa.search.Location in project here-android-sdk-examples by heremaps.
the class MainView method triggerRevGeocodeRequest.
private void triggerRevGeocodeRequest() {
m_resultTextView.setText("");
/* Create a ReverseGeocodeRequest object with a GeoCoordinate. */
GeoCoordinate coordinate = new GeoCoordinate(49.25914, -123.00777);
ReverseGeocodeRequest revGecodeRequest = new ReverseGeocodeRequest(coordinate);
revGecodeRequest.execute(new ResultListener<Location>() {
@Override
public void onCompleted(Location location, ErrorCode errorCode) {
if (errorCode == ErrorCode.NONE) {
/*
* From the location object, we retrieve the address and display to the screen.
* Please refer to HERE Android SDK doc for other supported APIs.
*/
updateTextView(location.getAddress().toString());
} else {
updateTextView("ERROR:RevGeocode Request returned error code:" + errorCode);
}
}
});
}
Aggregations