+gpointer do_cache(gpointer _image)
+{
+ GtkImage *image = _image;
+ g_message("Creating tile");
+ GisTile *tile = gis_tile_new(NULL, NORTH, SOUTH, EAST, WEST);
+ tile->children[0][1] = gis_tile_new(tile, NORTH, 0, 0, WEST);
+ tile = tile->children[0][1];
+
+ g_message("Fetching image");
+ GisWms *bmng_wms = gis_wms_new(
+ "http://www.nasa.network.com/wms", "bmng200406", "image/jpeg",
+ "bmng", ".jpg", 512, 256);
+ const char *path = gis_wms_make_local(bmng_wms, tile);
+
+ g_message("Loading image: [%s]", path);
+ GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(path, NULL);
+ gdk_threads_enter();
+ gtk_image_set_from_pixbuf(GTK_IMAGE(image), pixbuf);
+ gdk_threads_leave();
+
+ g_message("Cleaning up");
+ gis_wms_free(bmng_wms);
+ gis_tile_free(tile, NULL, NULL);
+ return NULL;
+}
+