We study the vectorial length compactification of the space of conjugacy classes of maximal representations of the fundamental group Γ of a closed hyperbolic surface Σ in PSL(2, R) n . We identify the boundary with the sphere P((ML) n ), where ML is the space of measured geodesic laminations on Σ. In the case n = 2, we give a geometric interpretation of the boundary as the space of homothety classes of R 2 -mixed structures on Σ. We associate to such a structure a dual tree-graded space endowed with an R 2 + -valued metric, which we show to be universal with respect to actions on products of two R-trees with the given length spectrum.PSL(2, R) × PSL(2, R) MAXIMAL REPRESENTATIONS 5.1. Flat structures 18 5.2. R 2 -mixed structures on a surface 20 5.3. The R 2 -length function of a mixed structure 22 5.4. Interpretation of ML × ML as − − → Mix(Σ) 22 6. The R 2 -tree-graded space dual to a mixed structure 25 6.1. Generalities on R n -tree-graded spaces. 25 6.2. Construction of the R 2 -space X M 26 6.3. Basic properties of X M 28 7. Embeddings in products of trees 31 References 33