Re: [Simile-Widgets] eventSource.getLatestDate() doesn't work!

47 views
Skip to first unread message

Michael Nosal

unread,
Mar 15, 2011, 2:02:26 PM3/15/11
to simile-...@googlegroups.com
Please use the Simile Timeline code available at http://www.simile-widgets.org/timeline

Your <script> tag is referencing the older code at simile.mit.edu.

Try <script src="http://api.simile-widgets.org/timeline/2.3.1/timeline-api.js" type="text/javascript"></script>

--Mike

On Mar 2, 2011, at 6:00 AM, mohsen anvaari wrote:

> Hi,
>
> Here is my code:
>
> ...
> <script src="http://simile.mit.edu/timeline/api/timeline-api.js?
> bundle=true" type="text/javascript"></script>
> ...
> var eventSource = new Timeline.DefaultEventSource(0);
> ...
> var tl = Timeline.create(document.getElementById("events"),
> bandInfos);
> tl.loadJSON("results.php?"+ (new Date().getTime()), function(json,
> url) {
> eventSource.loadJSON(json, url);
> });
> ...
> tl.getBand(0).setCenterVisibleDate(eventSource.getLatestDate());
> ...
>
> Everything work fine and I have the timeline with events displayed on
> it. The only problem is with the last line of code which returns this
> error:
>
> Uncaught TypeError: Cannot call method 'getTime' of null bundle.js:
> 4492
>
> Can anybody help me please?
>
> --
> You received this message because you are subscribed to the Google Groups "SIMILE Widgets" group.
> To post to this group, send email to simile-...@googlegroups.com.
> To unsubscribe from this group, send email to simile-widget...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/simile-widgets?hl=en.
>

mohsen anvaari

unread,
Mar 2, 2011, 6:00:26 AM3/2/11
to SIMILE Widgets

Greg Weber

unread,
Mar 12, 2012, 7:16:35 PM3/12/12
to simile-...@googlegroups.com
I am using 2.3.1 and I am getting this error.

Uncaught TypeError: Cannot call method 'getTime' of null simile-ajax-bundle.js:2395

The problem is it doesn't like the value of the 'start' field. If I use the number 2012 I get the error, but if I put it in a string "2012" it works.
These kinds of errors that go unchecked several layers deep are making it very difficult for me to get started with the timeline. Also, the downloads section still gives version 2.3.0

Thanks!
Greg Weber

> To post to this group, send email to simile-widgets@googlegroups.com.
> To unsubscribe from this group, send email to simile-widgets+unsubscribe@googlegroups.com.

> To post to this group, send email to simile-widgets@googlegroups.com.
> To unsubscribe from this group, send email to simile-widgets+unsubscribe@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages