[Users] Heron and PrintPreview.js
Lars-Göran Edholm
lged.morris at gmail.com
Wed Sep 26 14:32:53 CEST 2012
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20120926/c7443f04/attachment.htm
More information about the Users
mailing list