GSoC/GCI Archive
Google Code-in 2013 KDE

Playback of KML tours in Marble

completed by: Illya Kovalevskyy

mentors: Torsten Rahn, Dennis Nienhüser

Marble is a virtual globe and world atlas — your Swiss army knife for maps. Find your way and explore the world!

Please note: You can only work on this task when the following two tasks are completed:

We are working on integrating support for KML Tours into Marble. The user interface will be a panel (like Routing, Map View, ...) where a tour can be loaded from a .kml file, edited, played and also recorded to a movie file. In this task you'll add basic playback support for KML tours.

A KML tour consists of a playlist with a couple of different so-called primitives. Currently Marble supports loading three (four) types of primitives: TourControl (toggle playback/pause), Wait (pause playback for a specific amount of time), FlyTo (animated jump to a coordinate) and SoundCue (subject to completion of this task).

  • Read https://developers.google.com/kml/documentation/touring#tourtimelines and make sure you understand how the playback is supposed to work
  • Add a playback button to the Tour Panel in Marble. The button is supposed to toggle between play and pause mode of a tour loaded via the Tour Panel.
  • Create a new class TourPlayback. The class needs at least a MarbleWidget instance and a GeoDataTour as input. It should have slots for playing/pausing, and signalize changes of the playback status.
  • Download a tour like this one to have a test file to work with
  • Implement the playback of the tour, which traverses the playlist and triggers each primitive at the right time according to the time line (see KML reference above). Make sure that the playback button reflects the playback state and that it is possible to pause a running tour using the button.
    • For simplicity you can leave out the actual playback of SoundCues. Just add a debug statement (mDebug()) at that place noting the playback would happen at that point. We'll take care of it in a later task
    • Treat the FlyTo coordinate updates as bounce, i.e. do not animate the panning/zooming. We'll implement animated coordinate changes in a later task
    • Marble does not allow all 3D camera moves that are possible by Camera/LookAt tags. Just treat the coordinate values in those tags as coordinates/zoom values to center the map on

Helpful links: