static GdkPixmap *map_pixmap;
/* Tile cache, this might need some adjustment */
-#define MAP_CACHE_MAX (64)
+#define MAP_CACHE_DEFAULT (64)
static ImageCache *map_ic;
/** The "base tile" is the upper-left tile in the pixmap. */
map_widget=gtk_drawing_area_new();
map_timer=g_timer_new();
-map_ic=image_cache_new(MAP_CACHE_MAX);
+map_ic=image_cache_new(MAP_CACHE_DEFAULT);
gtk_widget_set_extension_events(GTK_WIDGET(map_widget), GDK_EXTENSION_EVENTS_ALL);
return map_widget;
}
+void
+map_set_cache_size(guint cache_size)
+{
+image_cache_set_size(map_ic, cache_size);
+}
+
static gboolean
map_cb_after_realize(GtkWidget *map_widget, gpointer data)
{
nzoom=_zoom+zdir;
if ((nzoom >= 0) && (nzoom < map_max_zoom - 1)) {
- image_cache_clear(map_ic);
map_set_zoom(nzoom);
}
return nzoom;