0
我是sencha的新手,我不知道如何將一些組件添加到我的面板中。我找不到任何有關這方面的信息,所以我認爲這很容易實現,我真的不知道如何開始。我喜歡這裏顯示的設計:http://dev.sencha.com/deploy/touch/examples/production/kiva/,但是在開始使用教程之後,即使採用設計方式,我也無法複製此項目。拜託,夥計們,幫助我如何處理這...將幾個組件添加到Sencha Touch 2的一個視圖中
舉例來說,如果我有我的主視圖(Main.js)看起來像這樣:
Ext.define("GS.view.Main", { extend: 'Ext.tab.Panel',
requires: ['Ext.TitleBar'],
config: {
tabBarPosition: 'top',
cetner: true,
items: [
{
xtype: 'profile'
},
{
xtype: 'map'
},
]
}
});
和位置:
Ext.define('GS.view.Position', { extend: 'Ext.Map',
xtype: 'map',
config: {
title: 'Position',
iconCls: 'time',
useCurrentLocation: true,
mapOptions: {
zoom: 19
},
listeners: {
maprender : function(comp, map){
new google.maps.Marker({
position: new google.maps.LatLng(this._geo.getLatitude(), this._geo.getLongitude()),
map: map
});
}
}
}
});
如何添加一些額外的組件到我的位置視圖?
感謝 米沃什
我一直在尋找一些其他的解決方案,但真的感謝您的建議。 – milosz0010 2012-03-27 19:07:19