public void requestDirections() { try { directionRequester.request(origin, destination, this); } catch (UnsupportedEncodingException uenc) { view.showError(R.string.message_error_encode); } }
@Override public void onFailure(String error) { view.showError(R.string.message_error_unavailable_service); }
@Override public void onSuccess(List<Coordinate> directions) { if (!directions.isEmpty()) view.setMapRoute(directions); }