  We present a sample of 135,873 RR Lyrae stars (RRLs) with precise
photometric-metallicity and distance estimates from our newly calibrated
$P-\phi_{31}-R_{21}-$[Fe/H]/$P-R_{21}-$[Fe/H] and $G$ band absolute
magnitude-metallicity relations. The $P-\phi_{31}-R_{21}-$[Fe/H] and
$P-R_{21}-$[Fe/H] relations for type RRab and type RRc stars are obtained from
nearly 2700 Gaia-identified RRLs with precise $\phi_{31}$ and $R_{21}$
measurements from the light curves and metallicity estimates from spectroscopy.
Using 236 nearby RRLs with accurate distances estimated from parallax
measurements with Gaia EDR3, new $G$ band absolute magnitude-metallicity
relations and near-infrared period-absolute magnitude-metallicity relations are
constructed. External checks, using other high-resolution spectroscopic sample
of field RRLs and RRL members of globular clusters (GCs), show that the typical
uncertainties in our photometric-metallicity estimates are about 0.24 and 0.16
dex for type RRab/c stars, respectively, without significant systematic bias
with respect to high-resolution spectroscopic metallicity measurements. The
accuracies of these metallicity estimates are much improved, especially for
RRab stars, when compared to those provided by the Gaia DR3 release.
Validations of our distance estimates, again by using members of GCs, show that
the typical distance errors are only 3-4%. The distance modulus
$\mu_0=18.503\pm0.001(stat)\pm0.040(syst)$ mag for the LMC and
$\mu_0=19.030\pm0.003(stat)\pm0.043(syst)$ mag for the SMC are estimated from
our RRab sample, respectively, and are in excellent agreement with previous
measurements. The mean metallicities of the LMC and SMC derived in this work
are also consistent with the previous determinations. Using our sample, a steep
metallicity gradient of $-0.024\pm0.001$ dex/kpc is found for the LMC, while a
negligible metallicity gradient is obtained for the SMC.
