  The metallicity and dust-to-metals ratio of the Galaxy are fundamental
parameters in understanding the ISM, but there is still uncertainty surrounding
these parameters. In this paper, the dust-to-metals ratio in the Galaxy is
determined using the photoelectric absorption of the X-ray afterglows of a
sample of several hundred gamma-ray bursts (GRBs) to determine the metal column
density in combination with Galactic dust maps to determine the line-of-sight
dust extinction through the Galaxy in the direction of the GRB. GRB afterglows
often have large extragalactic soft X-ray absorptions and therefore the GRB
sample's upper-bound will define the Galactic dust-to-metals relation. Using a
two-dimensional two-sample KS test, we determine this upper-bound and so derive
the dust-to-metals ratio of the Galaxy. We find N_H = 2.2^{+0.3}_{-0.4}e21
cm^-2 A_V assuming solar, Anders & Grevesse (1989), metallicity. This result is
consistent with previous findings using bright X-ray sources in the Galaxy.
Using the same technique but substituting the HI maps from the
Leiden-Argentine-Bonn survey for the dust maps, allows us to place a limit on
the metallicity in the Galaxy. We find a metallicity consistent with the Anders
& Grevesse (1989) solar values often used in X-ray fitting. Based on this and
previous studies, we suggest that the metallicity of a typical ISM sightline
through the Galaxy is ~0.25 dex higher than the current best estimate of the
solar metallicity. We further show that the dust-to-gas ratio seems to be
correlated with the total gas column density, and that this may be due to the
metallicity gradient observed toward the Galactic centre. Based on the
non-constant nature of the dust-to-gas ratio, we propose that the dust column
density, at N_H = 2.2e21 cm^-2 A_V, represents a better proxy for the soft
X-ray absorption column density than HI maps.
