There are two scenarios that popped into my mind.
First, he may have some underlying thing that makes him feel bad. A friend of mine has children with "food issues" we'll call them. I don't know the extent of it, but when her oldest daughter was born, she would scream constantly, and it turned out to be that she was allergic to eggs, which my friend ate every morning for breakfast, and it was getting into her breastmilk and causing a negative reaction in the baby. Even at 6 y/o, the child is still allergic to eggs -- they make her feel bad in one way or another, and if she eats them becomes whiny or starts crying because she feels bad. This same girl also gets migraines from bananas. When she was a pre-verbal toddler, my friend thought she was just whiny and needed to be disciplined; but once the baby was old enough to talk, she complained about her head hurting and her tummy hurting, etc. SO, you may need to rule out food issues. I've heard a lot of people having similar problems with their children that were related to food additives (particularly artificial food colorings -- oh, and I just recently read that the bright blue food dye has some people swearing it helps their migraines, so if one food dye can cure a headache, another one might cause one, or otherwise negatively affect a person).
On the other hand, my son sounds kinda like yours (except younger; but my sister's son is right about your son's age, and he whines terribly, and I'm *determined* that he not end up like that). I've switched up his diet, and that hasn't seemed to affect it one bit. Most of the time, he's a happy child, but then when something doesn't go his way, a lot of times he just bursts out into tears and/or whining. I think I've fed into that, although I didn't intend to. When he was little, he was a lot more clingy and whiny and needy than my older son, and I would comfort him a lot more... and I think even as he outgrew the "baby" stage where that was appropriate, I didn't outgrow the "babying" stage like I should have. :-/ So, it's been a harder row to hoe, to get him to have an appropriate response -- instead of bursting into tears or whining because his train track broke in one place, to try to train him to have the attitude of "it's no big deal" and "let's see if I can fix it" instead.
Basically, I've decided that he has gotten accustomed to getting the response he wants from me ("oh, you poor baby, come to mama"; or just any attention from me) by whining and crying (again, age-appropriate for an infant who can only express himself by crying, but not as an older child), and if I continue to give the response he's looking for, he's going to keep doing the same behavior. So, I'm using a two-pronged approach with his whining. First, I'm trying to teach him that whining and crying over everything is not acceptable (verbal reprimands mostly, and spanking if it's really over the top) and then model the behavior I want from him: "No, Seth, don't cry when your cookie breaks! Just say, 'Oh, dear, my cookie broke!'" -- that sort of thing. If children (or adults for that matter) continue to get positive reinforcement in either good or bad habits, they will continue in that; if they get a negative response (one they dislike), they will change their ways.