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 (TSZX). We correlate the temperatures from tSZ+X-ray imaging and those from X-ray spectroscopy a...