Ext.Loader.setConfig({enabled: true});
Ext.Loader.setPath('Ext.ux', '../ux');
Ext.require([
'Ext.window.*',
'Ext.ux.GMapPanel'
]);
Ext.onReady(function() {
var myMask = new Ext.LoadMask(Ext.getBody(), {msg:"Please wait..."});
myMask.show();
var layout = Ext.create('Ext.panel.Panel', {
//renderTo: 'layout',
width: window.innerWidth,
height: window.innerHeight,
//title: 'Border Layout', //no title will be blank
layout: 'border',
items: [{
title: 'Message List',
region: 'south', // position for region
xtype: 'panel',
height: 100,
split: true, // enable resizing
collapsible: true,
margins: '0 5 5 5',
collapsed: true
},{
//title: 'Map',
region: 'center',
xtype: 'gmappanel',
center: {geoCodeAddr: '4 Yawkey Way, Boston, MA, 02215-3409, USA',marker: {title: 'Fenway Park'}}
}],
renderTo: Ext.getBody() //get the body and display Layout at there
});
myMask.hide();
});
问题
为什么无法加载 gmappanel?
我试图显示加载掩码,当页面完成加载时只删除加载掩码?怎么做?