Suppose that $X$ is a paracompact Hausdorff space (e.g. a metric space) with $\dim X=n$ (the Lebesgue covering dimension). I want to find a proof (or a reference) that any (continuous) map $f: X \to K(\mathbb{Z},2)=\mathbb{C}P^\infty$ can be factorized, up homotopy, through a CW-complex $Z$ of the same dimension $n$, i.e. there is a diagram [![enter image description here][1]][1] which commutes, up to homotopy. [1]: https://i.sstatic.net/nnNKX.jpg