The code below is the right direction.
A couple of things:
* This code will add events to your eventSource, not replace the
existing events. You'd need to call eventSource.clear() if you want to
blow away the old events.
* You said "load a new XML file" but the code below is for json.
change 'json' to 'xml' and you're good (unless you really are loading
json).
* You need to have a valid reference for eventSource in the inner
anonymous function. Try:
function updateData(filename) {
var eventSource = tl.getBand(0).getEventSource();
Timeline.loadJSON(filename,
function(json, url) {eventSource.loadJSON(json,url); });
tl.layout();
}
Use the index of whichever band you want to load the data into in the
call to getBand.
If your bands have different event sources, then you'd need to
call .loadJSON on each one separately.
--Mike Nosal