We propose a method to map the temperature distribution of the hot gas in galaxy clusters that uses resolved images of the thermal Sunyaev-Zel'dovich (tSZ) effect in combination with X-ray data. Application to images from the New IRAM KIDs Array (NIKA) and XMM-Newton allows us to measure and determine the spatial distribution of the gas temperature in the merging cluster MACS J0717.5+3745, at z=0.55. Despite the complexity of the target object, we find a good morphological agreement between the temperature maps derived from X-ray spectroscopy only -- using XMM-Newton (TXMM) and Chandra (TCXO) -- and the new gas-mass-weighted tSZ+X-ray imaging method (TSZ). We correlate the temperatures from tSZ+X-ray imaging and those from X-ray spectroscopy alone and find that TSZ is higher than TXMM and lower than TCXO by ∼10% in both cases. Our results are limited by uncertainties in the geometry of the cluster gas, contamination from kinetic SZ (∼10%), and the absolute calibration of the tSZ map (7%). Investigation using a larger sample of clusters would help minimise these effects.