--- trunk/src/map-tool.c 2009/07/30 08:29:52 35 +++ trunk/src/map-tool.c 2009/08/02 18:37:10 38 @@ -141,6 +141,17 @@ return FALSE; } +static void map_draw_cachelist(GtkWidget *map, cache_t *cache) { + while(cache) { + GdkPixbuf *icon = icon_get(ICON_CACHE_TYPE, cache->type); + + osm_gps_map_add_image(OSM_GPS_MAP(map), + cache->pos.lat, cache->pos.lon, icon); + + cache = cache->next; + } +} + void map(appdata_t *appdata) { map_context_t context; context.appdata = appdata; @@ -170,6 +181,13 @@ g_free(path); + /* draw all geocaches */ + gpx_t *gpx = appdata->gpx; + while(gpx) { + map_draw_cachelist(context.widget, gpx->cache); + gpx = gpx->next; + } + g_signal_connect(G_OBJECT(context.widget), "configure-event", G_CALLBACK(on_map_configure), &context); #if 0