[Users] Geoext - Print Error

Andreas Hocevar ahocevar at opengeo.org
Fri Aug 6 10:57:59 CEST 2010


Hi Till,

the example you were looking at is from current trunk, and there were some changes since 0.7. You either have to base your code on the example found in the 0.7 release, or use GeoExt trunk. I would suggest the latter, because printing has been improved since 0.7.

Regards,
Andreas.

On Aug 6, 2010, at 10:51 , adams wrote:

> Dear list,
> 
> we implemented the print-panel (geoext 0.7) as follows:
> 
>     var printProvider = new GeoExt.data.PrintProvider({
>         method: "GET", // "POST" recommended for production use
>         capabilities: printCapabilities // from the info.json script in 
> the html
>     });
> 
>     printPage = new GeoExt.data.PrintPage({
>         printProvider: printProvider,
>         customParams: {
>             mapTitle: "Geoext is cool!"
>         }
>     });
> 
>     printExtent = new GeoExt.plugins.PrintExtent({
>         showOnInit: false,
>         printProvider: printProvider
>     });
> 
> and further down:
> 
>     mapPanel = new GeoExt.MapPanel({
>         ...
>         plugins: [printExtent],
>         ....
> 
> This was derived from the examples "print-extent" and "print-form". When 
> opening the print panel in our client, I get an error "page.center is 
> null [center: page.center.lon, page.center.lat]" .
> 
> Comparing our stuff with the example, I see, that in the form-example a 
> method is called:
> 
> printExtent.addPage();
> 
> doing this another error comes up: "printExtent.addPage is not a function"
> 
> 
> Any hint will make me happy and let me pay a drink in Barcelona... ;-)
> 
> Regards, Till
> 
> 
> _______________________________________________
> 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