The location of centroids in photon and electron maps of solar flares