[Users] Print panel overview not transforming from EPSG:900913 to EPSG:4326

Andreas Hocevar ahocevar at opengeo.org
Wed Oct 6 11:21:53 CEST 2010


Hi,

the MapPanel definition would be more interesting than the snippet you actually posted. But if you want to know how to configure an EPSG:900913 map for printing, you may want to have a look at this examples: http://dev.geoext.org/trunk/geoext/examples/print-preview-osm.html

Regards,
Andreas.

On Oct 6, 2010, at 10:29 , Robert Buckley wrote:

> Hi,
> 
> This is regarding the printProvider code availablke here.
> 
> http://dev.geoext.org/trunk/geoext/examples/print-preview.html
> 
> I want to provide a print function like in the example. My map uses googlemaps 
> and therefore the mapPanel is transforming epsg:900913 to EPSG:4326 
> 
> 
> Althought the print function defines the mapPanel as a source map, the map 
> options are not being loaded. When I try to print, the map window shows the 
> region west of Africa in the Atlantic (coordinates 0 , 0)
> 
> Here is my code..copied from the example.
> 
> {
>            text: "Drucken...",
>            icon: '../images/printer.png',
>            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: "Druckansicht",
>                    layout: "fit",
>                    width: 350,
>                    height: 350,
>                    items: [{
>                        xtype: "gx_printmappanel",
>                        sourceMap: mapPanel,
>                        printProvider: printProvider
>                    }],
>                    bbar: [{
>                        text: "PDF Erstellen...",
>                        icon: '../images/printer.png',
>                        handler: function(){ printDialog.items.get(0).print(); }
>                    }]
>                });
>                printDialog.show();
>            }
>        }
> 
> 
> 
> Can anyone explain what I am forgetting here?
> 
> 
> Thanks for any help,
> 
> Robert Buckley
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Users mailing list