By studying the elephants' speed and direction, researchers ruled out that elephants were getting visual or other cues from the fairly monotonous landscape. Instead, they appear to build a complex and remarkably accurate map of the territory in their heads.
As this study, which was published in Proceedings of the Royal Society B, shows so clearly, elephants are designed to operate in large territories. Elephants in the wild travel several miles per day, which is why it's so sad that many of them are kept in cramped cages in circuses and zoos. It's also part of the reason that foot and joint problems are so common among captive elephants - they're not moving the way nature intended.