Hi, i am desperately trying to add a simple printing button to my app. Using this example, I wanted to print the mapPanel with an OSM background, however the map is only 1px and the pdf is broken.
Here is my app..the print button is in the mappanel“s bottom bar. http://maps.zgb.de:8080/geoserver/www/testing/wea_kataster.html here is my code for the mappanel var mapPanel = new GeoExt.MapPanel({ // title: "Map", region: "center", width: 800, map: map, layers: [gsat, ghybrid,mapnik, layer, vr_wea], tbar: [toolbarItems], bbar: [{ text: "Print...", handler: function(){ // A window with the PrintMapPanel, which we can use to adjust // the print extent before creating the pdf. printDialog = new Ext.Window({ title: "Print Preview", width: 350, height: 500, items: [{ xtype: "gx_printmappanel", // use only a PanPanel control map: {controls: [new OpenLayers.Control.PanPanel()]}, sourceMap: mapPanel, printProvider: printProvider }], bbar: [{ text: "Create PDF", handler: function(){ printDialog.items.get(0).print(); } }] }); printDialog.show(); } }] }); thanks for any hints, Robert
_______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
