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