Although several studies have examined how honeybees gauge and report the distance and direction of a food source to their nestmates, relatively little is known about how this information is combined to obtain a representation of the position of the food source. In this study we manipulate the amount of celestial compass information available to the bee during flight, and analyse the encoding of spatial information in the waggle dance as well as in the navigation of the foraging bee. We find that the waggle dance encodes information about the total distance flown to the food source, even when celestial compass cues are available only for a part of the journey. This stands in contrast to how a bee gauges distance flown when it navigates back to a food source that it already knows. When bees were trained to find a feeder placed at a fixed distance in a tunnel in which celestial cues were partially occluded and then tested in a tunnel that was fully open to the sky, they searched for the feeder at a distance that corresponds closely to the distance that was flown under the open sky during the training. Thus, when navigating back to a food source, information about distance travelled is disregarded when there is no concurrent input from the celestial compass. We suggest that bees may possess two different odometers - a 'community' odometer that is used to provide information to nestmates via the dance, and a 'personal' odometer that is used by an experienced individual to return to a previously visited source.