Hi,
the problem I see with your code is that you should configure the projection,
units, maxResolution and maxExtent on the MapPanel, not the PrintMapPanel. The
PrintMapPanel will configure itself to use the same as the sourceMap.
Also (but you know this already), be advised that you cannot print Google
layers unless you are a paying Google Maps customer.
Regards,
Andreas.
On Oct 6, 2010, at 11:30 , Robert Buckley wrote:
> Thanks,
>
>
> I just realized this about 15 minutes ago.
>
> Here is my new code. I just copied the options from the mappanel to the
> printing
> function.
>
> tbar: [{
> text: "Drucken...",
> icon: '../images/printer.png',
> handler: function(){
> printDialog = new Ext.Window({
> title: "Druckansicht",
> layout: "fit",
> autoWidth: true,
> autoHeight: true,
> items: [{
> xtype: "gx_printmappanel",
> map: {projection: epsg900913,
> displayProjection: epsg4326,
> units: "m",
> numZoomLevels: 21,
> maxResolution: 156543.0339,
> maxExtent: new OpenLayers.Bounds(912352.369449, 6720955.021855,
> 1391765.410767, 7014473.210418)},
> sourceMap: mapPanel,
> printProvider: printProvider
> }],
>
> bbar: [{
> text: "PDF Erstellen...",
> handler: function(){ printDialog.items.get(0).print();
> }
> }]
> });
> printDialog.show();
> }
> }
>
>
> Thanks again for your help.
>
> Yours,
>
> Robert Buckley
> www.zgb.de
>
>
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users