A comparison of EUV spectroheliograms and photospheric magnetograms