The galactic magnetic field (GMF) and the intergalactic magnetic field (IGMF) affect the propagation of ultra-high energy cosmic rays (UHECRs) from the source to us. Here we examine the in uences of the GMF/IGFM and the dependence of their sky distribution on galactic latitude, b. We analyze the correlation between the arrival direction (AD) of UHECRs observed by the Pierre Auger Observatory and the large-scale structure of the universe in regions of sky divided by b. Specifically, we compare the AD distribution of observed UHECRs to that of mock UHECRs generated from a source model constructed with active galactic nuclei. Our source model has the smearing angle as a free parameter that re ects the de ection angle of UHECRs from the source. The results show that larger smearing angles are required for the observed distribution of UHECRs in lower galactic latitude regions. We obtain, for instance, a 1σ credible interval for smearing angle of 0° ≤ θs ≤ 72° at high galactic latitudes, 60° < b ≤ 90°, and of 75° ≤ θs ≤ 180°, -30° ≤ b ≤ 30°, at low galactic latitudes, respectively. The results show that the in uence of the GMF is stronger than that of the IGMF. In addition, we can estimate the strength of GMFs by these values; if we assume that UHECRs would have heavier nuclei, the estimated strengths of GMF are consistent with the observational value of a few μG. More data from the future experiments may make UHECR astronomy possible.