X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=src%2Ftile-test.c;h=a800b9c750117212d580785ad0512f422d0ddcf4;hb=2eaf81c925c9c1461cd5f1e17abc5443f95e9137;hp=7953ec51ee75792be7d64f71929630689934402d;hpb=1f59c39cbad9112d2c3fc06967f6e99a3d9c5a00;p=grits diff --git a/src/tile-test.c b/src/tile-test.c index 7953ec5..a800b9c 100644 --- a/src/tile-test.c +++ b/src/tile-test.c @@ -18,9 +18,9 @@ #include #include -#include "gis-wms.h" -#include "gis-util.h" -#include "objects/gis-tile.h" +#include "grits-util.h" +#include "data/grits-wms.h" +#include "objects/grits-tile.h" struct CacheState { GtkWidget *image; @@ -50,15 +50,15 @@ gpointer do_bmng_cache(gpointer _image) { GtkImage *image = _image; g_message("Creating bmng tile"); - GisTile *tile = gis_tile_new(NULL, NORTH, SOUTH, EAST, WEST); - tile->children[0][1] = gis_tile_new(tile, NORTH, 0, 0, WEST); + GritsTile *tile = grits_tile_new(NULL, NORTH, SOUTH, EAST, WEST); + tile->children[0][1] = grits_tile_new(tile, NORTH, 0, 0, WEST); tile = tile->children[0][1]; g_message("Fetching bmng image"); - GisWms *bmng_wms = gis_wms_new( + GritsWms *bmng_wms = grits_wms_new( "http://www.nasa.network.com/wms", "bmng200406", "image/jpeg", "bmng_test/", "jpg", 512, 256); - const char *path = gis_wms_make_local(bmng_wms, tile); + const char *path = grits_wms_fetch(bmng_wms, tile, GRITS_ONCE, NULL, NULL); g_message("Loading bmng image: [%s]", path); GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(path, NULL); @@ -67,8 +67,8 @@ gpointer do_bmng_cache(gpointer _image) gdk_threads_leave(); g_message("Cleaning bmng up"); - gis_wms_free(bmng_wms); - gis_tile_free(tile, NULL, NULL); + grits_wms_free(bmng_wms); + grits_tile_free(tile, NULL, NULL); return NULL; } @@ -76,15 +76,15 @@ gpointer do_osm_cache(gpointer _image) { GtkImage *image = _image; g_message("Creating osm tile"); - GisTile *tile = gis_tile_new(NULL, NORTH, SOUTH, EAST, WEST); - tile->children[0][1] = gis_tile_new(tile, NORTH, 0, 0, WEST); + GritsTile *tile = grits_tile_new(NULL, NORTH, SOUTH, EAST, WEST); + tile->children[0][1] = grits_tile_new(tile, NORTH, 0, 0, WEST); tile = tile->children[0][1]; g_message("Fetching osm image"); - GisWms *osm_wms = gis_wms_new( + GritsWms *osm_wms = grits_wms_new( "http://labs.metacarta.com/wms/vmap0", "basic", "image/png", "osm_test/", "png", 512, 256); - const char *path = gis_wms_make_local(osm_wms, tile); + const char *path = grits_wms_fetch(osm_wms, tile, GRITS_ONCE, NULL, NULL); g_message("Loading osm image: [%s]", path); GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(path, NULL); @@ -93,8 +93,8 @@ gpointer do_osm_cache(gpointer _image) gdk_threads_leave(); g_message("Cleaning osm up"); - gis_wms_free(osm_wms); - gis_tile_free(tile, NULL, NULL); + grits_wms_free(osm_wms); + grits_tile_free(tile, NULL, NULL); return NULL; }