View Full Version : [CLOSED-175] Issues with maps within carousels

7 Jun 2011, 7:34 AM
I have been using Map cards in a carousel in order to allow a user to swipe through maps. The user can also select from a dropdown to get a new carousel of maps.

The issue is: When loading a new carousel, only the map on the first card of the carousel is rendered.

I'm not sure if this is a Sencha bug, or what... I have tried using doLayout to force rendering of the maps... no luck yet.

Thanks in advance for the help

Live Demo (let me know if it doesn't work... I have some odd DNS settings that don't let me view the URL)


Sample code is also attached to ensure that this forum post does not become irrelevant after I take down the demo.

7 Jun 2011, 7:45 AM
carousels should have a card layout, in your code you are giving the carousel a fit layout. Fit layout is only appropriate when the container with a fit layout only has 1 direct child component (though the child can have other children itself).

7 Jun 2011, 7:48 AM
Updated the demo to use the card layout for the carousel... the issue is still occurring.

7 Jun 2011, 8:42 AM
hmm, I'm not sure yet why the maps aren't rendering. In the general sense this should work just fine, the small example below illustrates that you should be able to get this working:

onReady: function() {
var tripMapOptions = { // Used in rendering map
zoom: 14,
disableDefaultUI: true,
disableDoubleClickZoom: true,
draggable: false,
scrollwheel: false,
keyboardShortcuts: false

new Ext.Carousel({
fullscreen: true,
id: 'carousel',
items: [
new Ext.Map({mapOptions:tripMapOptions}),
new Ext.Map({mapOptions:tripMapOptions}),
new Ext.Map({mapOptions:tripMapOptions})

It's not jumping out at me why the above example works but your code isn't but I'll play around a bit and hopefully narrow it down

7 Jun 2011, 8:46 AM
Sorry, you appear to have misinterpreted what I was talking about.

If you look at the demo, the first carousel (with only 1 card) renders fine. If this initial carousel had more than one card, the cards would render fine (as in your sample code).

In my code, I am changing which carousel is active in the panel layout using the dropdown. When an alternate carousel is shown, the first map/item in the carousel renders, but the other map/items do not.

I think this is a case of deferred rendering of the map, but I cannot figure out how to "force" rendering of the map in the carousel.

7 Jun 2011, 11:16 AM
Yup, I was misinterpreting the issue, my apologies. I have your example running and am debugging the code.

10 Jun 2011, 7:52 AM
Any update?

I would like to know if I did something wrong before I file it as a bug.

Thanks for the help so far.

5 Jul 2011, 10:12 PM
This appears to be a valid bug - it's on the pile for Touch 1.1.1

15 Nov 2011, 4:31 PM
Fixed in 2.0