[Users] problem with mappanel inside tabpanel

Michael Schulz mandschulz at googlemail.com
Tue Apr 26 14:49:36 CEST 2011


Hi Bart,

thanks, I applied the patch to mapPanel.js, but now unfortunately I
don't get any map tiles anymore. If I click on my max extent button in
the toolbar, I get a "bounds is null" error...

Cheers, Michael

2011/4/26 Bart van den Eijnden (OSGIS) <bartvde at osgis.nl>:
> Hi Michael,
>
> any chance you can check if this patch: http://trac.geoext.org/ticket/419
> fixes your issue?
>
> Best regards,
> Bart
>
>> 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
>> _______________________________________________
>> Users mailing list
>> Users at geoext.org
>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>>
>
>
>



-- 
-----------------------------------------------------------
Michael Schulz

Christoph-Mang-Str. 5
D-79100 Freiburg


More information about the Users mailing list