Open GoogleCodeExporter opened 8 years ago
I received the same error loading a JSON source.
Original comment by quasaur
on 30 Jun 2010 at 3:53
Testing Platform info:
Fedora 13 - 2.6.33.5-124.fc13.x86_64 #1 SMP
Apache 2.2.15 (64-bit)
MySQL 5.1.47
Joomla 1.5.18
Browser: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100622
Fedora/3.6.4-1.fc13 Firefox/3.6.4
Original comment by quasaur
on 30 Jun 2010 at 5:56
Sample JSON File:
{
'wiki-url':"http://simile.mit.edu/shelf/",
'wiki-section':"Simile JFK Timeline",
'dateTimeFormat':'Gregorian',
'events':[
{
'start':new Date(-10741,0,0)
'end':new Date(-9839,0,0)
'durationEvent':true
'title':"Birth"
'description':"Birth of Enos."},{
'start':new Date(-9838,0,0)
'end':new Date(-8930,0,0)
'durationEvent':true
'title':"Birth"
'description':"Cainan is born."},{
'start':new Date(-11080,0,0)
'end':new Date(-8880,0,0)
'durationEvent':true
'title':"Calendar"
'description':"Earth: START: The Precessional Era of Leo"},{
'start':new Date(-8929,0,0)
'end':new Date(-8036,0,0)
'durationEvent':true
'title':"Birth"
'description':"Mahalaleel is born."}]
}
Original comment by quasaur
on 30 Jun 2010 at 5:59
Timeline Script:
// Script to build History of the World SIMILE Timeline
var d = Timeline.DateTime.parseGregorianDateTime("-11080");
var theme = Timeline.ClassicTheme.create(); // create the theme
theme.timeline_start = new Date('April 1, -11080');
theme.timeline_stop = new Date('January 1, 4126');
function onLoad() {
var eventSource = new Timeline.DefaultEventSource();
var bandInfos = [
Timeline.createBandInfo({
eventSource: eventSource,
date: d,
theme: theme,
width: "70%",
intervalUnit: Timeline.DateTime.DECADE,
intervalPixels: 100
}),
Timeline.createBandInfo({
overview: true,
eventSource: eventSource,
date: d,
theme: theme,
width: "30%",
intervalUnit: Timeline.DateTime.CENTURY,
intervalPixels: 200
})
];
bandInfos[1].syncWith = 0;
bandInfos[1].highlight = true;
tl = Timeline.create(document.getElementById("my-timeline"), bandInfos, Timeline.HORIZONTAL);
Timeline.loadJSON("test.json", function(json, url) { eventSource.loadJSON(json, url); })
}
function centerTimeline(year) {
tl.getBand(0).setCenterVisibleDate(new Date(year, 0, 1));
}
var resizeTimerID = null;
function onResize() {
if (resizeTimerID == null) {
resizeTimerID = window.setTimeout(function() {resizeTimerID = null;tl.layout();}, 500);
}
}
Original comment by quasaur
on 30 Jun 2010 at 6:04
Part of the problem seems to be the date: Timeline can't process this JSON data:
{
'dateTimeFormat':'iso8601',
'events':[
{
'start':'-10741',
'end':'-9839',
'isDuration':true,
'title':'Birth',
'link':'http://timehasanend.org/public/thae_ch03.html#05',
'description':'Birth of Enos.'}]
}
...so the question is: what is Timeline's date limitations?
Original comment by quasaur
on 1 Jul 2010 at 6:44
[SOLVED]...
'dateTimeFormat' should be'gregorian' NOT 'Gregorian'
special characters (like the apostrophe) need to be escaped.
Original comment by quasaur
on 3 Jul 2010 at 1:34
Original comment by ryan...@csail.mit.edu
on 23 Jun 2011 at 10:08
Original issue reported on code.google.com by
Philipp....@gmail.com
on 19 Feb 2010 at 9:14