`Hot Jupiter' extrasolar planets are expected to be tidally locked because they are close (<0.05 astronomical units, where 1AU is the average Sun-Earth distance) to their parent stars, resulting in permanent daysides and nightsides. By observing systems where the planet and star periodically eclipse each other, several groups have been able to estimate the temperatures of the daysides of these planets. A key question is whether the atmosphere is able to transport the energy incident upon the dayside to the nightside, which will determine the temperature at different points on the planet's surface. Here we report observations of HD 189733, the closest of these eclipsing planetary systems, over half an orbital period, from which we can construct a `map' of the distribution of temperatures. We detected the increase in brightness as the dayside of the planet rotated into view. We estimate a minimum brightness temperature of 973+/-33K and a maximum brightness temperature of 1,212+/-11K at a wavelength of 8μm, indicating that energy from the irradiated dayside is efficiently redistributed throughout the atmosphere, in contrast to a recent claim for another hot Jupiter. Our data indicate that the peak hemisphere-integrated brightness occurs 16+/-6° before opposition, corresponding to a hotspot shifted east of the substellar point. The secondary eclipse (when the planet moves behind the star) occurs 120+/-24s later than predicted, which may indicate a slightly eccentric orbit.