Bug 349453

Summary: KMZ file support for tours
Product: [Applications] marble Reporter: Tobias <tobias.jakobs>
Component: generalAssignee: marble-bugs
Status: CONFIRMED ---    
Severity: wishlist CC: nienhueser
Priority: NOR Keywords: junior-jobs
Version: 2.1 (KDE Applications 16.12)   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

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.