EN
We give a necessary and sufficient condition for a map deffned on a simply-connected quasi-convex metric space to factor through a tree. In case the target is the Euclidean plane and the map is Hölder continuous with exponent bigger than 1/2, such maps can be characterized by the vanishing of some integrals over winding number functions. This in particular shows that if the target is the Heisenberg group equipped with the Carnot-Carathéodory metric and the Hölder exponent of the map is bigger than 2/3, the map factors through a tree.