#include #include #include #include #include #include #include #include #include using namespace mapnik; #include #include using namespace std; int main() { datasource_cache::instance()->register_datasources ("/usr/local/lib/mapnik/input"); freetype_engine::register_font ("/usr/local/lib/mapnik/fonts/Vera.ttf"); Map m (800,800); load_map(m,"test.xml"); Envelope bbox (-1.42,50.93,-1.38,50.97); m.zoomToBox(bbox); Image32 buf (m.getWidth(), m.getHeight()); agg_renderer r(m,buf); r.apply(); save_to_file(buf.data(),"blah.png","png"); return 0; }