Hi Brian, Re dates with year less than 100: the problem is the standard javascript date object's parser thinks that you're referring to a year between 1900 and 1999. I think you can use a different parser, see some of the timelines in the example directory that use dates in that era. Eg the Jewish or Christian history timeline.
Re: durationEvent and isDuration. Sorry, the documentation is ahead of the release. This fix is only in the trunk at this time. For release 2.2, durationEvent is ignored, you should use isDuration. -- You're getting the default event type, which is "instance Event" isDuration works correctly for xml files, it is negated for json files. See the issue in the bug tracker. HTH, Larry ________________________________ From: Brian <[email protected]> To: SIMILE Widgets <[email protected]> Sent: Monday, December 15, 2008 5:02:29 PM Subject: dates between 0 and 99 AD Hi, I'm having trouble displaying dates between 0 and 99 AD on timeline (any version). I'm not versed in java script or html, so I've mostly built my timelines from examples. I even copied dates between the above-mentioned interval from existing examples into my xml source file, but to no avail. If I change the year to 0100, the event appears, and all events from 100 on appear as well. I don't have a public url for this, so I've pasted my html code below. I've also included a snippet of my xml source. One other issue as well - if I use 'durationEvent="true"', the event displays as a point with an opaque band spanning the time interval. If I revert back to the 'isDuration="true"' attribute, it displays as a solid band. Isn't the durationEvent attribute also supposed to display as a solid band if it's set to '"true"? Probably something simple that I'm doing wrong. Maybe there's some date function or formatting that I'm missing, but thanks for any help! -Brian xml source <data> <event title="Funan mentioned in Chinese records" start="Jan 01 0001 00:00:00 GMT" end="Dec 31 0500 00:00:00 GMT" durationEvent="true"><b>ca. 1 - 500s CE</b>: Lower Mekong River society called Funan is mentioned in Chinese records. (Funan may be transcription of Khmer word phnom, meaning "hill.")</event> <event title="Funan renamed to Khmers" start="Jan 01 0500 00:00:00 GMT" end="Dec 31 0700 00:00:00 GMT" durationEvent="true"><b>ca. 500s - 700s CE</b>: Hindu Mekong kingdom of Khmers called Zhenla (or Chenla) by the Chinese supercedes Funan.</event> <event title="Jayavarman II unifies Khmers" start="Jan 01 0770 00:00:00 GMT" end="Dec 31 0834 00:00:00 GMT" durationEvent="true"><b>ca. 770 - 834 CE</b>: Jayavarman II unifies Khmers in Angkor region, freeing them from rule of "Java" (exact location of "Java" not certain).</event> .......(more) </data> HTML code <html> <head> <title>Palgen Test 1</title> <script src="http://static.simile.mit.edu/timeline/api-2.2.0/timeline- api.js" type="text/javascript"></script> <script> function onLoad() { var eventSourcePalgen = new Timeline.DefaultEventSource(); var bandInfos = [ Timeline.createBandInfo({ eventSource: eventSourcePalgen, date: "Jan 01 0100 00:00:00 GMT", width: "100%", intervalUnit: Timeline.DateTime.CENTURY, intervalPixels: 220 }) ]; Timeline.create(document.getElementById("my-timeline"), bandInfos); Timeline.loadXML("palgenimport2.xml", function(xml, url) { eventSourcePalgen.loadXML(xml, url); }); } </head> <body onload="onLoad();" onresize="onResize();"> <div id="body"> <h1>Palgen Test 1</h1> <div id="my-timeline" class="timeline-default" style="height: 600px; border: 1px solid #aaa"></div> </div> </body> </html> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SIMILE Widgets" group. 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 -~----------~----~----~----~------~----~------~--~---
