[Users] Heron and PrintPreview.js

Just van den Broecke just at justobjects.nl
Wed Sep 26 14:56:50 CEST 2012


Hi Lars,

Your question would belong more to the Heron mailing list:
http://groups.google.com/group/geoext-viewer-devel

Printing will be supported in the next version of Heron (0.7 planned 
coming weeks) and these issues are then solved. Also the GeoExt ux 
PrintPreview will be supported.

If you are eager to try out, you can use the SVN version or hosted Heron 
libs. See an example (work in progress!) here:
http://lib.heron-mc.org/heron/latest/examples/printpreview

If you add your own button to the toolbar for a print popup you always 
have the mapPanel passed, see example:
http://lib.heron-mc.org/heron/latest/examples/toolbar-item

Getting the legendPanel is still to be solved at this moment, but at 
runtime we may use an Ext function to find the LegendPanel e.g. by id I 
think.

best,

Just

On 26-09-12 14:32, Lars-Göran Edholm wrote:
> Hi!
> I'm trying to use the code in PrintPreview.js in my Heron applcation.
> The problem is that I can´t figure out how to get the mapPanel and
> legendPanel because i they are in Heron.layout:
>   I tried with
>   sourceMap: Heron.App. getMapPanel()
> but that doesn´t work.
> code:
> //****************************************************
> function showPrintWindow() {
>      var printWindow = new Ext.Window({
> .
> .
> .
> .
>              },
>              includeLegend: true,
>              mapTitle: "PrintMapPanel Demo",
>              sourceMap: mapPanel,
>              legend: legendPanel
>          })
>      }).show().center();
> }
> //****************************************************
> Heron.layout = {
> .
> .
> .
> {
>     xtype: 'panel',
>     id: 'hr-map-and-info-container',
>     layout: 'border',
>     region: 'center',
>     width: '100%',
>     collapsible: true,
>     split : true,
>     border: false,
>     items: [
>      {
>       xtype: 'hr_mappanel',
>       id: 'hr-map',
>       region: 'center',
>       collapsible : false,
>       border: false,
>       hropts: Heron.options.map
>      },
>      {
>   .
> .{
>     xtype: 'panel',
>     id: 'hr-menu-right-container',
>     layout: 'accordion',
>     region : "east",
>     width: 240,
>     collapsible: true,
>     collapsed: true,
>     split : true,
>     border: false,
>     items: [
>      {
>       xtype: 'hr_layerlegendpanel',
>       hropts: {
>        // Preload Legends on initial startup
>        // Will fire WMS GetLegendGraphic's for WMS Legends
>        // Otherwise Legends will be loaded only when Layer
>        // becomes visible. Default: false
>        prefetchLegends: false
>       }
> //****************************************************
> Any ideas how to get mapPanel and legendPanel?
> Lars-Göran
>
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>



More information about the Users mailing list