Bug 349453 - KMZ file support for tours
Summary: KMZ file support for tours
Status: CONFIRMED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: 2.1 (KDE Applications 16.12)
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: marble-bugs
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2015-06-21 11:56 UTC by Tobias
Modified: 2017-04-27 15:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias 2015-06-21 11:56:48 UTC
I'm using Marble version 1.9.95 (1.10 Beta 3).

It would be a nice improvement if it would be possible to open KMZ files as tours. 
The nice thing about KMZ files is, that they are smaller and easier to distribute then KML files.  Especially if there are additional Images for the tour.

It shouldn't be to hard to implement because:
1. KMZ files are just zipped KML files. 
2. Marble already supports KMZ files in the File->Open... dialogue.

Reproducible: Always

Steps to Reproduce:
1. Start Marble
2. Try to open a KMZ file in the tour docker.

Actual Results:  
Doesn't open the file.

Expected Results:  
Open the file as tour.

KMZ file documentation
https://developers.google.com/kml/documentation/kmzarchives
Comment 1 Dennis Nienhüser 2015-06-21 13:35:16 UTC
Good catch. In the simplest form it should be as easy as this patch:

diff --git a/src/lib/marble/TourWidget.cpp b/src/lib/marble/TourWidget.cpp
index 90b8c2b..0f281ce 100644
--- a/src/lib/marble/TourWidget.cpp
+++ b/src/lib/marble/TourWidget.cpp
@@ -367,7 +367,7 @@ void TourWidget::handleSliderMove( int value )
 void TourWidgetPrivate::openFile()
 {
     if ( overrideModifications() ) {
-        QString const filename = QFileDialog::getOpenFileName( q, QObject::tr( "Open Tour" ), QDir::homePath(), QObject::tr( "KML Tours (*.kml)" ) );
+        QString const filename = QFileDialog::getOpenFileName( q, QObject::tr( "Open Tour" ), QDir::homePath(), QObject::tr( "KML Tours (*.kml *.kmz)" ) );
         if ( !filename.isEmpty() ) {
             ParsingRunnerManager manager( m_widget->model()->pluginManager() );
             GeoDataDocument* document = manager.openFile( filename );


However I'd rather have someone test it properly, and fix similar occurences (e.g. importing bookmarks). For a proper support we should insert "*.kmz" as a suggestion in the file dialog only if Marble was compiled with support for kmz really.
Comment 2 Dennis Nienhüser 2015-06-21 13:36:58 UTC
Looking at the code excerpt above another nice improvement would be to use the last directory used as starting directory for the dialog (instead of the home dir)
Comment 3 Tobias 2017-04-27 15:00:43 UTC
Still happens with Marble 2.2 for Windows.