Thanks David,

I got an email earlier from Joern Clausen with a link to his Google/Earthquake 
page (http://www.oe-files.de/gmaps/usgseq.html) and javascript which was 
helpful.  I want to do similar work, but I also want to lay the groundwork for 
animating the map display when the user drags the event painter across the 
lower timeline band.  Your suggestion to use the "addOnSelectListener" function 
sounds promising.  I'll want to get a list of multiple events that fall within 
the selected time window, associate them with their lat/long coords and plot 
the coords on the map.

I'm not quite sure how to associate a Timeline event with lat and long coords 
(drawn from the original GeoJSON data source).  Maybe when I initially parse my 
input GeoJSON to Timeline events I could add my array of Timeline events to 
another array with lat and long coords stored as well.  Then when I use the 
SelectListener to get the selected events, I can loop through the second 
(event, lat and long) array evaluating whether the event is the same as the 
current selected event.  That's assuming that it makes sense to evaluate event 
objects against each other.  Would I instead have to evaluate a property of the 
event object (like an eventid)?  

Is there a better way to store lat and long coords with events that doesn't 
require me to loop through an array of the entire event data set?  Maybe some 
way to add properties to a Timeline event?  That way when I use SelectListener 
to get selected events, I could already have the lat and long coords at the 
ready.  It might make the map display a lot faster.

If I also wanted to establish a "pre-canned" animation sequence at the click of 
a button, how would I go about that?  Are there methods to move the event 
painter smoothly across a time range all within a certain duration of "real" 
time?  That would be perfect.

I think I'm getting a handle on this now.  I'll keep you posted on my progress 
(I'll let you know when I get stuck again)!  Hopefully, I will be able to post 
a website to the Internet sometime in the next month.

Thanks again,
Andrew Murdoch


> Date: Mon, 17 Dec 2007 23:23:19 -0500
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: Synchronizing Timeline and OpenLayers javascript mapping library
> 
> Andrew,
> 
> Is this close to what you're thinking?
>     http://www.oe-files.de/gmaps/usgseq.html
> 
> If you're using Timeline version 2.0
>     http://static.simile.mit.edu/timeline/api-2.0/timeline-api.js
> then you can add a select listener like so
>     tl.getBand(0).getEventPainter().addOnSelectListener(function(eventID) {
>        var evt = tl.getBand(0).getEventSource().getEvent(eventID);
>        ... do something with evt ...
>     });
> 
> And to pop up a bubble on the timeline for a particular event (given its 
> ID):
>     tl.getBand(o).showBubbleForEvent(eventID);
> 
> David
> 
> Andrew Murdoch wrote:
> > Hello,
> >
> > I'm trying to get the SIMILE Timeline tool to synchronize events 
> > between the timeline bars and an OpenLayers GIS web-map interface.  
> > Has anyone done similar work?
> >
> > My initial plans to solve this problem include getting data from the 
> > Geoserver web-map server (supplying GIS data to OpenLayers) in GeoJSON 
> > format.  It seems that Timeline expects a particular format for JSON 
> > (or XML) input files however, so it seems I need to parse my GeoJSON 
> > attribute data and create a Timeline formatted JSON (or XML) file on 
> > the fly.  Ideally, Timeline would let you tie certain attribute 
> > properties from the GeoJSON file to the needed Timeline properties 
> > (start, end, etc.) but I think I'll be able to reformat my data in 
> > javascript for the Timeline tool.
> >
> > My question is how to synchronize the event source loaded into 
> > Timeline with the map frame presented by OpenLayers.  Is there a way 
> > to extract the events shown in the highlighted slider bar to JSON or 
> > XML format on the fly?  Should I wait for a mouse-up event to extract 
> > the events shown?  Once I have a JSON file of events (with their 
> > latitude and longitude attributes) I think I can load the JSON into 
> > OpenLayers as a Vector Layer and refresh the map.  I may need to 
> > reformat the Timeline output back to GeoJSON format for import to 
> > OpenLayers however.
> >
> > Does it  sound like I'm on the right track, or am I making this way 
> > too complicated?  What methods do I need to call to extract the events 
> > shown in the highlighted slider bar and what format would that extract 
> > be in?  Are there JSON javascript libraries I should consider using 
> > for the format conversions back and forth between Timeline JSON format 
> > and GeoJSON format?
> >
> > Thanks so much for your consideration of this problem.
> > Andrew Murdoch
> >
> > ------------------------------------------------------------------------
> > Share life as it happens with the new Windows Live. Share now! 
> > <http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007>
> >  
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > General mailing list
> > [email protected]
> > http://simile.mit.edu/mailman/listinfo/general
> >   
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://simile.mit.edu/mailman/listinfo/general

_________________________________________________________________
Get the power of Windows + Web with the new Windows Live.
http://www.windowslive.com?ocid=TXT_TAGHM_Wave2_powerofwindows_122007
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to