4
votes

I'm having an issue about placing google map in my Sencha touch application .. Following is the code..

           new Ext.application({
                name:'Touch Start',
            launch:function(){
        var map = new Ext.Panel({
     fulscreen:true,
     items:[
     {
    xtype:'map',
    useCurrentLocation:true,

    }
    ]
    });
this.viewport = map;
 }
 });

Well its working fine and gives an alert that "Application Support/iPhone SImulator/5.1/Applictios/887ED997-705D-4F52-AF9C-C740C0979302/maps/app/www/index.html" Would Like to use Your Current Location..

But When I click ok nothing Happen but a blank screen .. Please help if anyone has some idea about this.. thanx in advance

2
this.viewport = map; looks odd to me because you already set fullscreen: true. Do you see something if you replace your map with a list? - A1rPun
Well after removing this.viewport = map; i am facing the same problem . - Burhan Mughal

2 Answers

1
votes

In Addition to @A1rPun answer:

You have an error in your App configuration:

name:'Touch Start', 

is invalid!

Use

name:'TouchStart',

instead. Whitespace is not allowed. Note that is from that on your Namespace! With the one above your app can't load/resolve any View, Model, Controller or Store.

1
votes

You are using a Ext.aplication that requires a specific folder structure.

To make your example work just write:

var map = new Ext.Panel({
    fullscreen:true,
    items:[{
        xtype:'map',
        useCurrentLocation:true
    }]
});

PS: fullscreen is with 2 L's