PDA

View Full Version : 0.95 Map Control not showing



steve1964
15 Sep 2010, 3:37 AM
On iphone 3gs 3.1.3 the map control are not showing, works fine on Chrome, was the same on 0.94.
The portion of the code:



// STARTUP TABPANEL

var tabpanelStartup = new Ext.TabPanel({
fullscreen: true,
ui: 'dark',
id: 'startup',
animation: 'slide',
layout: 'card',
tabBar: {
dock: 'bottom',
scroll: 'horizontal',
sortable: true,
layout: {
pack: 'center'
}
},
cls: 'card1',
items: [
{ iconCls: 'home1', title: 'Home',
items: [
{xtype: 'component', html: '<div class="places">Discover Places, Events & Deals</div><div class="wifi">Free & Secure Wi-Fi Internet</div><div class="domain">You are connected to ' + domain + '</div>'},
{
width: Ext.is.Phone ? undefined : 320,
height: 245,
xtype: 'list',
listeners: {
itemtap: function(list, index){
var rec = list.store.getAt(index), id = rec.get('title') + '-card', c = tabpanelStartup.getComponent(id);

//if (!c) {
c = tabpanelStartup.add({
itemId: id,
//html: rec.get('shortContent'),
dockedItems: [{
xtype: 'toolbar',
dock: 'top',
//title: rec.get('title'),
items: [
{
text: 'Info',
handler: function(){
Ext.getCmp('ca').setCard(0);
}},
{
text: 'Map',
handler: function(){
Ext.getCmp('ca').setCard(1);
}},
{
text: 'GET',
id: 'btnGET',
handler: function(){
Ext.getCmp('ca').setCard(2);
}},
{
text: 'Back',
ui: 'back',
handler: function(){
tabpanelStartup.setCard(0);
}}
]
}],
items: [{xtype: 'carousel',
id: 'ca',
width: 320,
height: 265,
items: [
{html: 'Info: ' + rec.get('detailsContent')},
{xtype: 'map',
mapOptions : {
center : new google.maps.LatLng(rec.get('latitude'), rec.get('longitude')),
zoom : 12,
mapTypeId : google.maps.MapTypeId.ROADMAP,
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.DEFAULT
}
},
plugins : [
new Ext.plugin.GMap.Tracker({
trackSuspended : true, //suspend tracking initially
highAccuracy : false,
marker : new google.maps.Marker({
position: new google.maps.LatLng(rec.get('latitude'), rec.get('longitude')),
title : rec.get('title'),
shadow: new google.maps.MarkerImage('images/shadow.png',new google.maps.Size(64, 52),new google.maps.Point(0,0),new google.maps.Point(-5, 42)),
icon : new google.maps.MarkerImage('images/point.png',new google.maps.Size(32, 31),new google.maps.Point(0,0),new google.maps.Point(16, 31))
})
}),
new Ext.plugin.GMap.Traffic({ hidden : true })
]
},{
html: '<img src="../atm/aadvs/' + rec.get('detailsContentURL') + '" />'
}]

}]
});
tabpanelStartup.add(c);
//}
if (rec.get('PremiumATMType_type') == "Normal") {
Ext.getCmp('ca').remove(2);
Ext.getCmp('btnGET').hide();
}
tabpanelStartup.setCard(c, 'slide');
}
},
store: atmStore,
tpl: '<tpl for="."><div class="atm"><div style="height: 16px;"><img src="../atm/logo/{logoURL}" />&nbsp;&nbsp;<strong>{title}</strong></div><div style="margin-left: 42px">{shortContent}</div></div></tpl>',
itemSelector: 'div.atm',
singleSelect: true,
grouped: false,
indexBar: false,
loadingText: 'Loading...',
emptyText: 'No ATM found...',
scroll: 'vertical'
}]
},
{ iconCls: 'login', title: 'Login', items: [formL = new Ext.form.FormPanel(formLogin),message]},
{ iconCls: 'register', title: 'Register', items: [formR = new Ext.form.FormPanel(formRegister)]}
]
});