The sandpile group Pic^0(G) of a finite graph G is a discrete analogue of the Jacobian of a Riemann surface which was rediscovered several times in the contexts of arithmetic geometry, self-organized criticality, random walks, and algorithms. Given a ribbon graph G, Holroyd et al. used the "rotor-routing" model to define a free and transitive action of Pic^0(G) on the set of spanning trees of G. However, their construction depends a priori on a choice of basepoint vertex. Ellenberg asked whether this action does in fact depend on the choice of basepoint. We answer this question by proving that the action of Pic^0(G) is independent of the basepoint if and only if G is a planar ribbon graph.