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@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to