Results 1 to 4 of 4

Thread: [OPEN-558] Map canvas on 4th panel of a carousel is screwed up

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1

    Default [OPEN-558] Map canvas on 4th panel of a carousel is screwed up

    The map is sized at a kind of minimum size, just enough to contain the controls and then resizes erratically if you move it around.

    This only happens when you put the map further down the stack of panels in a carousel or tabPanel in the 4th slot (or higher?).

    In my using google maps in the past I've seen this problem when you don't size the container before initializing the map. Just a guess.

    Sencha is so darn exciting though!

    Here's code to reproduce:

    Ext.setup({
    tableStartupScreen:'x.png',
    phoneStartupScreen:'x.png',
    icon:'x.png',
    glossOnIcon:false,

    onReady:function(){

    var pn1 = new Ext.Panel({
    title:'first panel',
    html:'something here'
    });

    var pn2 = new Ext.Panel({
    title:'first panel',
    html:'something here'
    });

    var pn3 = new Ext.Panel({
    title:'first panel',
    html:'something here'
    });

    var pn4 = new Ext.Panel({
    layout: 'fit',
    title:"map",
    items:[
    {
    xtype:'map'
    }
    ]
    });
    var master = new Ext.Carousel({
    fullscreen:true,
    layout:{
    type:'hbox',
    align:'stretch',
    pack:'center'
    },
    defaults:{
    flex:1
    },
    items:[
    // pn4 //works
    // pn1, pn4 //works
    // pn1, pn2, pn4 //works
    // pn1, pn2, pn3 //works
    pn1, pn2, pn3, pn4 //doesn't work!
    // pn1, pn4, pn2, pn3 //works

    ]
    });
    }
    });

  2. #2
    Sencha User BrendanC's Avatar
    Join Date
    Aug 2010
    Posts
    534

    Default

    Thanks for the bug report.

  3. #3
    Sencha User
    Join Date
    May 2009
    Posts
    18

    Default

    Hello,

    Any news about this bug ? I'm getting the exact same thing displaying charts on the fourth panel of my carousel.

  4. #4

    Default

    a work around for this problem is to call the resize method of the google map object. Please find below a sample code for the map panel

    Code:
    App.views.MapView = Ext.extend(Ext.Panel, {
        layout: 'fit',
        fullscreen: true,
        initComponent: function() {
            Ext.apply(this, {
                items: [{
                    xtype: 'map',
                    id: 'location',
                    layout: 'fit',
                    fullscreen: true,
                    useCurrentLocation: true
                }],
            });
        App.views.InfoView.superclass.initComponent.call(this);
        var map = Ext.getCmp('location').map;
            this.on({
                show: function(){
            google.maps.event.trigger(map, 'resize');
            google.maps.event.trigger(map, 'zoom_changed');
                }
            });
    }
    });
    Please refer the following post as a reference
    http://www.sencha.com/forum/showthre...-Ext.tab.Panel

Similar Threads

  1. [FIXED-403] Android 2.2 map bug
    By mario.casola in forum Sencha Touch 1.x: Bugs
    Replies: 15
    Last Post: 1 Dec 2010, 5:03 AM
  2. Problem with Carousel and Map, same problem in Kiva
    By steve1964 in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 9 Oct 2010, 5:46 AM
  3. Map inside Carousel
    By kidrecursive in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 4 Oct 2010, 8:02 AM
  4. Raphael Canvas embedded into Ext.Panel?
    By RandyMcMillan in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 19 Aug 2010, 8:30 AM
  5. Tree and Grid in 1 Canvas/Panel
    By ruchika in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 9 Jul 2009, 4:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •