Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-1426 in a recent build.
  1. #1
    Sencha User
    Join Date
    Jun 2009
    Posts
    410
    Vote Rating
    2
    parky128 is on a distinguished road

      0  

    Default Map and Screen Orientation

    Map and Screen Orientation


    Hi,

    I have a tab panel layout, one panel is a Map and the other is a List component. If I am not on the Map and change the screen orientation and then switch back to the Map view, the actual map does not resize and fill the screen correctly, I end up with a portion of the screen showing the map and the rest is just a greyed out.

    This doesnt happen if you are already on the Map view and are changing the screen orientation around (I know the orientationchange event gets fired on Viewport too)

    So, I am wondering what the best way is to detect if the screen orientation has changed since last viewing the Map. Then if it has changed I need to get the map to resize so it fills the screen correctly. Would I need to manually fire an orientationchange event here on the Viewport?

    I hope this makes sense!

    Thanks

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,207
    Vote Rating
    856
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    looks like a bug to me
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    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


    The following override to PR4 should fix the issue:

    Code:
    Ext.override(Ext.Map, {
        show: function() {
            this.callParent(arguments);
            var gm = (window.google || {}).maps,
                map = this.getMap();
            if (gm && map) {
                gm.event.trigger(map, "resize");
            }
        }
    });

    Sencha Inc

    Jamie Avins

    @jamieavins

Thread Participants: 2