I managed to do this by adding a scroll listener to my bottom band (2) and
set the centre date (via setCenterVisibleDate) to the bottom band's date
plus a specified offset.
/* get bands to scroll without matching dates */
tl.getBand(2).addOnScrollListener(function(band) {
var default_date=new Date(band.getCenterVisibleDate());
// get milliseconds between centre date and midnight Jan 1 1970.
var center_date_milliseconds=Date.UTC(default_date.getFullYear(),
default_date.getMonth(), default_date.getDate());
var date_offset=-137102400000; // band1 offset in milliseconds
var date_offset2=-169089600000; // band2 offset in milliseconds
var band_date=new Date(center_date_milliseconds+date_offset);
tl.getBand(0).setCenterVisibleDate(band_date);
band_date=new Date(center_date_milliseconds+date_offset2);
tl.getBand(1).setCenterVisibleDate(band_date);
});
Hope this helps,
FG
--
You received this message because you are subscribed to the Google Groups
"SIMILE Widgets" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/simile-widgets/-/-QM-sPR2AekJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/simile-widgets?hl=en.