Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-2223 in a recent build.
  1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    5
    Vote Rating
    0
    n-dee is on a distinguished road

      0  

    Default [RC1] Problem with Map in TabPanel

    [RC1] Problem with Map in TabPanel


    Hello,

    thanks everybody @sencha for the amazing work!

    I think there is a problem when using Ext.Map in a tabpanel. If the map isn't in the first position, the map doesn't center correct. Please have a look at the current O'Reilly Example (http://docs.sencha.com/touch/2-0/#!/example/oreilly). If you tap on "Location" the map appears but the center (and marker) is in the top left corner.

    Any Ideas?

    Best Regards
    Andreas
    Last edited by n-dee; 23 Feb 2012 at 8:17 AM. Reason: Example-Url corrected

  2. #2
    Touch Premium Member svenna's Avatar
    Join Date
    Jun 2007
    Location
    Oslo,Norway
    Posts
    568
    Vote Rating
    27
    svenna has a spectacular aura about svenna has a spectacular aura about

      0  

    Default


    I noticed this bug in B1, but it was fixed in B3.
    In my test applications it is still working in RC.
    See B3 release notes for more info.
    Sven Tore Iversen

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    5
    Vote Rating
    0
    n-dee is on a distinguished road

      0  

    Default


    Hello Sven,

    thanks for your answer. If possible, please have a look at the O'Reilly-Example (http://docs.sencha.com/touch/2-0/#!/example/oreilly). Does it shows the map and the marker centered correctly?

    Thanks,
    Andreas

  4. #4
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    18
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Thank you for the report.

    Sencha Inc

    Jamie Avins

    @jamieavins

  5. #5
    Touch Premium Member svenna's Avatar
    Join Date
    Jun 2007
    Location
    Oslo,Norway
    Posts
    568
    Vote Rating
    27
    svenna has a spectacular aura about svenna has a spectacular aura about

      0  

    Default


    Nope.. This example does have a problem. I looked for it when replying, but the server was not available at the time.

    Can confirm the problem on both the public sample (unknown version) and the rc-download.
    However, in my own app it's working.

    Fixed in bug 1916. So I guess there is an other bug with the same symptoms, in this sample.


    http://www.sencha.com/forum/showthre...ntered-problem
    Sven Tore Iversen

  6. #6
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    18
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    There is a bug with the passing the config the way it is done in that example currently. This override should fix the issue:

    Code:
    Ext.override('Ext.overrides.Map', {
        override: 'Ext.Map',
        getMapOptions: function() {
            return Ext.merge({}, this.options || this.getInitialConfig('mapOptions'));
        }
    });

    Sencha Inc

    Jamie Avins

    @jamieavins

  7. #7
    Touch Premium Member svenna's Avatar
    Join Date
    Jun 2007
    Location
    Oslo,Norway
    Posts
    568
    Vote Rating
    27
    svenna has a spectacular aura about svenna has a spectacular aura about

      0  

    Default


    that was quick
    Sven Tore Iversen

  8. #8
    Sencha User
    Join Date
    Oct 2011
    Posts
    5
    Vote Rating
    0
    n-dee is on a distinguished road

      0  

    Default


    The fix works! Thanks Jamie, thanks Sven!

  9. #9
    Sencha User
    Join Date
    Feb 2012
    Posts
    44
    Vote Rating
    0
    mpond is on a distinguished road

      0  

    Default still buggy

    still buggy


    Jamie - I've placed your code in oreilly/app.js, but find that the map is only centered if I reload the app and immediately click on Location. Clicking any other option first (e.g., Speakers, Tweets) then on Location, results in the map no longer being centered (with the location just off the top left). This is even off the ST2 example on sencha's own server using Chrome under Win7.

  10. #10
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    18
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    I noticed that it can be a bit sensitive to timing, it works better on device than on Desktop. I'll try to pin it down a bit better.

    Sencha Inc

    Jamie Avins

    @jamieavins