Here’s a great post about hiking with little ones: Five Tips for Joyful Hiking with Little Kids courtesy of nature mom.
A particularly good suggestion is “forget about the destination”, though this can change with the age of the child. At age 3-4 this definitely applies, as they are distracted by every little thing they see, and it’s best to just resign yourself to the fact that as soon as they start flagging, it’s time to turn around and head back, no matter how far you’ve gotten.