PDA

View Full Version : Map example?



diesalher
30 Nov 2011, 3:47 AM
hi, is there any working map example for Sencha Touch 2 ?


I'm having issues with thye rendering of a simple map without overlays or anythisnk, and i'm sure there must be an example out there.

Thanks!

diesalher
30 Nov 2011, 5:27 AM
The problem starts when i have a tabpanel...

Here is my code. Anyone can tell me whats happening here with the map?

Thanks!

29699

Brendan Carroll
30 Nov 2011, 6:44 AM
Have you looked at the examples, searched the forums? The examples are the first place you should go. There are, however, some issues with the map class at present but it sounds as though they've been resolved at PR3. We'll see when it drop....THIS WEEK.

diesalher
30 Nov 2011, 7:19 AM
Have you looked at the examples, searched the forums? The examples are the first place you should go. There are, however, some issues with the map class at present but it sounds as though they've been resolved at PR3. We'll see when it drop....THIS WEEK.

Yes, i've seen the examples (the map example works, but is too simple and i cannot reproduce the behaviour in a tabpanel ) , i've been looking the forums (sencha touch 2, sencha touch 1, ext js,..), but the few threads that i have found with this issue are a bit old and didnt help me much.

I know pr3 is this week and i'm waiting for it.

I just supossed that there must be people with working map examples.

rdougan
1 Dec 2011, 3:52 PM
There will be a map example in the next release.

vdubinsky
13 Dec 2011, 5:02 PM
I can confirm the problem OP identified. The problem seems to be related to TabPanel. This is easily reproduced by taking the 'map' example that Sencha Touch ships with and replacing the Ext.Panel container with Ext.TabPanel container and inserting just one panel with the same code that the 'map' example ships with. Result, map stops working. Commented out code works, the replacement code doesn't (sencha-touch-2.0.0-pr3).


//Ext.create('Ext.Panel', {
// fullscreen: true,
// layout: 'fit',
// items: [toolbar, mapdemo]
//});
Ext.create('Ext.TabPanel', {
fullscreen: true,
tabBarPosition: 'bottom',

items: [
{
title: 'Home',
iconCls: 'home',
items: [toolbar, mapdemo]


}
]
});

diesalher
14 Dec 2011, 4:08 AM
This issue seems fixed in PR3

Thanks! :)

vdubinsky
14 Dec 2011, 7:58 AM
Really? Well it's not working for me with the code I pasted above where the only change I made to the Sencha map example is replace the Panel with TabPanel as the hosting component. And I'm using 2.0.0 pr3.

diesalher
14 Dec 2011, 8:05 AM
works for me...

Here is my test app with a working map in a tabpanel

30004

vdubinsky
14 Dec 2011, 10:29 AM
works for me...

Here is my test app with a working map in a tabpanel


Indeed your app works. Thanks for providing it. Although it looks simple, your app is structured very differently from mine and I need to learn more Ext JS to fully understand it. I suspect that it's something simple I'm doing wrong. Thanks for assistance.

diesalher
14 Dec 2011, 10:32 AM
I'm learning too, this app is just an example app i'm doing to understand how mvc works.