PDA

View Full Version : GMapPanel UX: map doesn't appear when using Card layout



erosszz
11 Jan 2010, 8:39 PM
map is doesn't appear/show when using Card layout...

click event of Card layout to switch to the next screen:


// gis-content-panel: is a Card layout
// gmap-panel: Border layout that contains the GMapPanel
Ext.getCmp('gis-content-panel').layout.setActiveItem('gmap-panel');


when I resize the internet browser.... the map will show because the resize event will call the layout process...

so i think, it needs to be refreshed or doLayout or show.... but don't know how to implement....

erosszz
11 Jan 2010, 8:51 PM
modified click event for screen switch of Card layout:


// gis-content-panel: is a Card layout
// gmap-panel: Border layout that contains the GMapPanel
Ext.getCmp('gis-content-panel').layout.setActiveItem('gmap-panel');
Ext.getCmp('gmap-panel').doLayout();


and it seems to be ok...

but is this the best practice? or there is other better approach?