PDA

View Full Version : Big gray area in google Map



kulshreshtha.s
19 Jul 2011, 11:14 PM
Hi!

I want to render google map in one of my view, But its showing big gray area. The map is not displayed full screen. Here is the code. Let me know if I'm doing it wrong . I'm a newbee:s



dealraiser.views.DealraiserMap = Ext.extend(Ext.Panel,{

fullscreen : true,

dockedItems: [{
xtype: 'toolbar',
title: 'Deals near you',
dock: 'top',
items: [{
xtype: 'button',
text: 'Home',
ui: 'Home',
handler: function(){
dealraiser.views.viewport.setActiveItem(dealraiser.views.dealraiserHome , 'slide');
}

}]
}],

items: [{
xtype: 'map',
title: 'Deals Nearby!',
layout: {
type: 'vbox',
align: 'stretch'
},
id: 'dealMap',
flex: 2,
useCurrentLocation: true,
mapOptions: {
zoom: 11
},
listeners: {
activate: function() {
console.log('ACTIVATED map');
google.maps.event.trigger('dealMap', 'resize');
},
beforedeactivate: function (p) {
console.log("DEACTIVATING map")
p.destroy();
},
resize: function () {
console.log('RESIZE map');
google.maps.event.trigger(Ext.getCmp('dealMap'), 'resize');
}
}
}]

});




Thanks!!