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