#include "mapnik_interface.h"
#include "globals.h"
+#include "settings.h"
#if MAPNIK_VERSION < 200000
#include <mapnik/envelope.hpp>
}
}
+#define VIK_SETTINGS_MAPNIK_BUFFER_SIZE "mapnik_buffer_size"
+
/**
* mapnik_interface_load_map_file:
*
// Only set buffer size if the buffer size isn't explicitly set in the mapnik stylesheet.
// Alternatively render a bigger 'virtual' tile and then only use the appropriate subset
if (mi->myMap->buffer_size() == 0) {
- mi->myMap->set_buffer_size((width+height/4)); // e.g. 128 for a 256x256 image.
+ gint buffer_size = (width+height/4); // e.g. 128 for a 256x256 image.
+ gint tmp;
+ if ( a_settings_get_integer ( VIK_SETTINGS_MAPNIK_BUFFER_SIZE, &tmp ) )
+ buffer_size = tmp;
+
+ mi->myMap->set_buffer_size(buffer_size);
}
g_debug ("%s layers: %d", __FUNCTION__, mi->myMap->layer_count() );