Graham Forte wrote:
> Hello all,
> I am trying to access an eventSource element.
> I create my timelines dynamically using the following:
>
> tl.loadJSON(type, function(json, url) {eventSource.loadJSON(json, url);});
> url is a Servlet PrintWriter output.
>
>
> I currently have a link in the info bubble that calls a function on
> an Iframe that contains a map.
>
> I need to call this function when the dots are clicked (not from
> inside the bubble).
> I can already override the bubble popup and can call a function that
> takes no parms.
> I need to somehow call that function that will pass parms(specifically
> lat and lon).
>
> I did see this post below but I dont see how I can relate it to the
> way I set the eventSource:
>
If you look at the bottom of
http://simile.mit.edu/timeline/api/scripts/painters.js
you'll see
Timeline.DurationEventPainter.prototype._showBubble = function(x, y, evt) {
var div = this._band.openBubbleForPoint(
x, y,
this._theme.event.bubble.width,
this._theme.event.bubble.height
);
evt.fillInfoBubble(div, this._theme, this._band.getLabeller());
};
I think you want to override that with you own code, which looks
something like this:
Timeline.DurationEventPainter.prototype._showBubble = function(x, y, evt) {
callYourOwnFunction(evt.point);
};
where evt.point is similar to the other trick.
David
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general