+gpointer do_osm2_cache(gpointer _image)
+{
+ GtkImage *image = _image;
+ g_message("Creating osm2 tile");
+ GritsTile *tile = grits_tile_new(NULL, 85.0511, -85.0511, EAST, WEST);
+ tile->children[0][1] = grits_tile_new(tile, 85.0511, 0, 0, WEST);
+ tile = tile->children[0][1];
+
+ g_message("Fetching osm2 image");
+ GritsTms *osm2_tms = grits_tms_new("http://tile.openstreetmap.org",
+ "tms_test/", "png");
+ const char *path = grits_tms_fetch(osm2_tms, tile, GRITS_ONCE, NULL, NULL);
+
+ g_message("Loading osm2 image: [%s]", path);
+ GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(path, NULL);
+ load_image(GTK_IMAGE(image), pixbuf);
+
+ g_message("Cleaning osm2 up");
+ grits_tms_free(osm2_tms);
+ grits_tile_free(tile, NULL, NULL);
+ return NULL;
+}
+
+