Imaging temperature fields at the nanoscale is a central challenge in various areas of science and technology. Nanoscopic hotspots, such as those observed in integrated circuits or plasmonic nanostructures, can be used to modify the local properties of matter, govern physical processes, activate chemical reactions and trigger biological mechanisms in living organisms. The development of high-resolution thermometry techniques is essential for understanding local thermal non-equilibrium processes during the operation of numerous nanoscale devices. Here we present a technique to map temperature fields using a scanning thermal microscope. Our method permits the elimination of tip-sample contact-related artefacts, a major hurdle that so far has limited the use of scanning probe microscopy for nanoscale thermometry. We map local Peltier effects at the metal-semiconductor contacts to an indium arsenide nanowire and self-heating of a metal interconnect with 7 mK and sub-10 nm spatial temperature resolution.