  The asymptotic dimension is an invariant of metric spaces introduced by
Gromov in the context of geometric group theory. When restricted to graphs and
their shortest paths metric, the asymptotic dimension can be seen as a large
scale version of weak diameter colorings (also known as weak diameter network
decompositions), i.e. colorings in which each monochromatic component has small
weak diameter.
  In this paper, we prove that for any $p$, the class of graphs excluding
$K_{3,p}$ as a minor has asymptotic dimension at most 2. This implies that the
class of all graphs embeddable on any fixed surface (and in particular the
class of planar graphs) has asymptotic dimension 2, which gives a positive
answer to a recent question of Fujiwara and Papasoglu. Our result extends from
graphs to Riemannian surfaces. We also prove that graphs of bounded pathwidth
have asymptotic dimension at most 1 and graphs of bounded layered pathwidth
have asymptotic dimension at most 2. We give some applications of our
techniques to graph classes defined in a topological or geometrical way, and to
graph classes of polynomial growth. Finally we prove that the class of bounded
degree graphs from any fixed proper minor-closed class has asymptotic dimension
at most 2. This can be seen as a large scale generalization of the result that
bounded degree graphs from any fixed proper minor-closed class are 3-colorable
with monochromatic components of bounded size. This also implies that
(infinite) Cayley graphs avoiding some minor have asymptotic dimension at most
2, which solves a problem raised by Ostrovskii and Rosenthal.
