var layout = Ext.create('Ext.panel.Panel', {
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
}, tree, {
html: '<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAZx1jmE9yB533ED9suD13buyd0pEfmTzI&sensor=false&dummy=.js">
</script>
<script type="text/javascript">
init();
function init() {
var googleMapOptions =
{
center: new google.maps.LatLng(53.5267, -1.13330),
zoom: 16,
mapTypeId: google.maps.MapTypeId.ROADMAP};
map = new google.maps.Map(document.getElementById("map_canvas"),googleMapOptions);
}</script>
<body>
<div id="map_canvas" style="width:600px; height:400px"></div>
</body>',
renderTo: Ext.getBody()
}],
renderTo: Ext.getBody()
// get the body and display Layout at there
});
但我使用http://jsfiddle.net/anthor/ufTpN/工作得很好,當粘貼在ExrJS,然後無法加載谷歌地圖。爲什麼?ExtJS HTML加載谷歌地圖失敗
PS:我不想用Gmappanel並沒有IFRAME,因爲我想這個網頁
您在控制檯中遇到什麼錯誤? – 2013-04-24 14:26:32
@CyrilPangilinan什麼都沒有,沒有錯誤 – 2013-04-26 15:49:18