Florian,
Thanks, I've done the same now. I now have:
eventSource = new Timeline.DefaultEventSource();
msEventSource = new Timeline.DefaultEventSource();
and
Timeline.createBandInfo({
eventSource: msEventSource,
width: "20%",
timeZone: 0,
intervalUnit:
Timeline.DateTime.SECOND,
intervalPixels: 500
}),
Timeline.createBandInfo({
eventSource: eventSource,
width: "15%",
timeZone: 0,
intervalUnit: Timeline.DateTime.HOUR,
intervalPixels: 100
}), ...
then for the incidents (which I add to both) I have:
incidentEvtA =
eventSource.LoadEventComplete(...);
incidentEvtB =
msEventSource.LoadEventComplete(...);
and for the activities that only appear on the first (SECONDs) band
(which at 500pixels/second is well spaced to show the granularity
required):
activityEvt =
msEventSource.LoadEventComplete(...);
I load the data an incident at a time (using some XML messages from a
server) which contains the data required for the timeline, map and
fault report that are displayed on screen. This way i can have the
timeline scroll to the latest incident and the map centre on the
location of the fault on the map automatically.
I'm afraid I can't post a URL at the moment because it's using kinda
sensitive real-world data, but I'm putting together a demo using
artificial data on a small real-world network for a demo I'm giving
at a conference, so I'll post the URL once I have it completed!
Cheers again for the help!
Alan
On 17 May 2007, at 16:08, Florian Fangohr wrote:
Alan,
I just did something like that on a timeline using different XML
files.
I identified different event sources variables first:
function onLoad() {
var eventSourcePrint = new Timeline.DefaultEventSource();
var eventSourhceWeb = new Timeline.DefaultEventSource();
…
told the bands to use that source
…
var bandInfos = [
Timeline.createBandInfo({
eventSource: eventSourceWeb,
width: "30%",
intervalUnit: Timeline.DateTime.MONTH,
intervalPixels: 50,
theme: webTheme
}),
Timeline.createBandInfo({
eventSource: eventSourcePrint,
width: "30%",
intervalUnit: Timeline.DateTime.MONTH,
intervalPixels: 50,
theme: printTheme
}),
…
then finally link to the appropriate XML file
…
tl = Timeline.create(document.getElementById("my-timeline"),
bandInfos);
Timeline.loadXML("webHistory.xml", function(xml, url)
{ eventSourceWeb.loadXML(xml, url); });
tl = Timeline.create(document.getElementById("my-timeline"),
bandInfos);
Timeline.loadXML("printHistory.xml", function(xml, url)
{ eventSourcePrint.loadXML(xml, url); });
}
Hope this helps.
Florian
On May 17, 2007, at 8:39 AM, [EMAIL PROTECTED] wrote:
From: Alan McMorran <[EMAIL PROTECTED]>
Subject: Adding Events to only Bands
Quick question, which is probably covered in the documentation but
I'm just missing it. Is there a way to have events appear in only
select bands on a timeline? The reason I ask is that I'm adding in
some events that are in the millisecond range and while I want them
to appear in the seconds band, they just clutter up the hours and
days bands. I have other duration events which cover the entire life-
span of the incident (it's for showing faults on an electrical
network), so I'd like them to appear in the long-term view, but when
you scroll to it, the individual events that caused the incident will
be in the seconds and minutes bands.
I figure there must be a way to add attributes to each event that
denotes which band it should appear in, and if there is no current
way I'll have a fiddle with the code. I just wondered if the
functionality was there already or if anyone had figured out a nice
elegant way of doing it (since anything I come up with will
undoubtedly be just a hack!)
Cheers
Alan
--
Dr Alan McMorran
Research Fellow
Advanced Electrical Systems Group
Institute for Energy and Environment
Electronic and Electrical Engineering Department
Royal College Building
University of Strathclyde
Glasgow G1 1XW.
Tel: +44 (0)141 548 4839
Mob: +44 (0) 7968 024 063
-
honest communications
for a better tomorroh
http://fangohr.com
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general