  We discuss the enumeration of planar graphs using bijections with suitably
decorated trees, which allow for keeping track of the geodesic distances
between faces of the graph. The corresponding generating functions obey
non-linear recursion relations on the geodesic distance. These are solved by
use of stationary multi-soliton tau-functions of suitable reductions of the KP
hierarchy. We obtain a unified formulation of the (multi-) critical continuum
limit describing large graphs with marked points at large geodesic distances,
and obtain integrable differential equations for the corresponding scaling
functions. This provides a continuum formulation of two-dimensional quantum
gravity, in terms of the geodesic distance.
