Hi Brian,

Welcome to Timeline.

There are two different functions "loadJSON" -- one is from the
Timeline object, the other is from the eventSource object.

Your script has two problems that I see:
1) You need to create an event source and associate it with your
bands:

var eventSource = new Timeline.DefaultEventSource(0); // create an
empty eventSource
...
                Timeline.createBandInfo({
                   ...
                    eventSource:    eventSource,   // attach event
source to a band
                  ...

Note: an event source can be associated with more than one band. Eg a
regular and overview band.

2) The Timeline instance object's loadJSON takes the url and a
callback function.
The callback function usually calls the event source's loadJSON
function. It takes the json data and the base url for the data.
Eg

            tl.loadJSON("/events.json", function(json, url)
{eventSource.loadJSON(json, url);}
                                );
or perhaps more clearly:
           callback_function: function(json, url) {eventSource.loadJSON
(json, url);}
            tl.loadJSON("/events.json", callback_function);

Regards,

Larry

On Apr 6, 6:13 pm, Brian Jensen <[email protected]> wrote:
> Also if I change the lines in timeline-api from:
>
> var url = useLocalResources ?
>             "http://127.0.0.1:9999/ajax/api/simile-ajax-api.js?
> bundle=false" :
>             "http://static.simile.mit.edu/ajax/api-2.2.0/simile-ajax-
> api.js";
>
> to
>
> var url = (document.location.toString().indexOf('https://') != -1 ?
> "https" : "http") + "://" + window.location.href.split("/")[2] + "/
> javascripts/timeline_js/timeline-api.js?bundle=true";
>
> then I get an infinate loop where the timeline-api is downloaded over
> and over again.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to