diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index 709e029..22824d9 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -2159,12 +2159,14 @@ layers_to_surface (ChamplainView *view,
 {
   ClutterActorIter iter;
   ClutterActor *child;
+  int i = 0;
 
   clutter_actor_iter_init (&iter, view->priv->user_layers);
   while (clutter_actor_iter_next (&iter, &child))
     {
       ChamplainLayer *layer = CHAMPLAIN_LAYER (child);
       cairo_surface_t *surface;
+      char path[256];
 
       if (!CHAMPLAIN_IS_EXPORTABLE (layer))
         continue;
@@ -2174,6 +2176,9 @@ layers_to_surface (ChamplainView *view,
         continue;
 
       paint_surface (view, cr, surface, 0, 0, 255);
+      snprintf(path, 256, "/tmp/surface-%d.png", i);
+      cairo_surface_write_to_png(surface, path);
+      i++;
     }
 }
 
