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