PDA

View Full Version : gmappanel and form in window



mnask79
22 Nov 2011, 11:44 AM
hi all ,

im trying to show a window and inside it search form and google map window , and its working but not as i wish

- form panel is plain , i dont want it plain
- when i resize form , i get white space in gmappanel
- collaps move to up and down not to right or left

please find the script below and tell me what if i'm missing anything

regards




var fsf = Ext.create('Ext.form.Panel', {
region: 'center',
width : 100 ,
plain : false ,
bodyStyle:'padding:5px 5px 0',
fieldDefaults: {
msgTarget: 'side',
labelWidth: 75
},
defaultType: 'textfield',
layout: 'form',

items: [{
fieldLabel: 'City',
id : 'city',
name: 'city'
},{
fieldLabel: 'Street',
id : 'street',
name: 'street'
}]
});




var mapwin = Ext.create('Ext.Panel', {
region: 'west',
//title: 'Navigation',
plain:false ,
split: true,
collapsible: true,
floatable: false,
frame:false,
border:false,
width: 890,
//minWidth: 700,
height: 550,
items: [{
xtype: 'gmappanel',
zoomLevel: 14,
gmapType: 'map',
mapConfOpts: ['enableScrollWheelZoom','enableDoubleClickZoom','enableDragging'],
mapControls: ['GSmallMapControl','GMapTypeControl','NonExistantControl'],
setCenter: {
geoCodeAddr: '4 Yawkey Way, Boston, MA, 02215-3409, USA',
marker: {title: 'Fenway Park'}
},
markers: [{
lat: 42.339641,
lng: -71.094224,
marker: {title: 'Boston Museum of Fine Arts'},
listeners: {
click: function(e){
Ext.Msg.alert({title: 'Its fine', text: 'and its art.'});
}
}
},{
lat: 42.339419,
lng: -71.09077,
marker: {title: 'Northeastern University'}
}]
}]
});

var win = Ext.create('widget.window', {
title: 'Layout Window',
closable: true,
plain:false,
closeAction: 'hide',
width: 1200,
minWidth: 350,
height: 550,
layout: 'border',
bodyStyle: 'padding: 5px;',
items: [fsf, mapwin]
});



win.show()

mitchellsimoens
22 Nov 2011, 12:56 PM
What do you mean you don't want it plain? What do you want? frame?

If you want the west region to collapse up/down then switch it to be the north or south region.