Results 1 to 3 of 3

Thread: Map and Screen Orientation

    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
    419
    Vote Rating
    2
      0  

    Default 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 User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,030
    Vote Rating
    1368
      0  

    Default

    looks like a bug to me
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

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

Posting Permissions

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