[Users] problem with mappanel inside tabpanel
Michael Schulz
mandschulz at googlemail.com
Tue Apr 26 12:36:26 CEST 2011
Hi,
I found a problem when adding a mappanel to tabpanel when then
mappanel has a tool or bottombar assigned. There seems to be sth.
wrong with the calculation of the height of the mappanel. The height
of the tbar is not taken into account, in that e.g. the OL scaleline
is hidden to 50% at the lower left, or when using a bottombar, the
complete bottombar is not visible.
I just reproduced this issue with the mappanel-viewport example (only
the changes):
added at line 56:
// ZoomToMaxExtent control, a "button" control
var action = new GeoExt.Action({
control: new OpenLayers.Control.ZoomToMaxExtent(),
map: map,
text: "max extent",
tooltip: "zoom to max extent"
});
var toolbar = new Ext.Toolbar({
items : [
{xtype: 'tbfill'}
,action
]
});
var scaleline = new OpenLayers.Control.ScaleLine();
map.addControl(scaleline);
change the viewport to:
new Ext.Viewport({
layout: "border",
items: [{
region: "north",
contentEl: "title",
height: 50
},{
region: "center",
id: "tabpanel",
xtype: "tabpanel",
activeTab: 0,
frame:true,
defaults: {
autoHeight: true,
layout: 'fit'
},
items: [{
id: "mappanel",
title: "Map",
xtype: "gx_mappanel",
map: map,
layers: [layer],
extent: extent,
split: true,
tbar: toolbar
}]
}, {
region: "east",
title: "Description",
contentEl: "description",
width: 200,
split: true
}]
});
Then you should see the problem. Can someone help?
Cheers, Michael
--
-----------------------------------------------------------
Michael Schulz
Christoph-Mang-Str. 5
D-79100 Freiburg
More information about the Users
mailing list