This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Map theme file does not exist

Tags: None
(comma "," separated)
biruks
Registered Member
Posts
2
Karma
0

Map theme file does not exist

Wed Dec 20, 2017 9:11 am
I'm new to marble and using marble-14.12.3. I built and install the source code using cmake with VS2010 . Then I tried to run a simple test code as shown below.
Code: Select all
#include <QApplication>

#include <marble/MarbleWidget.h>
using namespace Marble;

int main(int argc, char** argv)
{
    QApplication app(argc,argv);

    // Create a Marble QWidget without a parent
    MarbleWidget *mapWidget = new MarbleWidget();

    // Load the OpenStreetMap map
    mapWidget->setMapThemeId(QString("F:/Libraries/Marble/marble-14.12.3/data/maps/earth/openstreetmap/openstreetmap.dgml"));

    mapWidget->show();

    return app.exec();
}
. But it shows black screen and generates an application output as below.
Map theme file does not exist: ""
Map theme file does not exist: ""
Falling back to default theme: "earth/srtm/srtm.dgml"
Map theme file does not exist: ""
Couldn't find a valid DGML map.
LEAK: 1 Page
LEAK: 1 Frame
LEAK: 3 RenderObject

Please Help!!
biruks
Registered Member
Posts
2
Karma
0

Re: Map theme file does not exist  Topic is solved

Thu Dec 21, 2017 11:37 am
The paths to plugins and data is compiled into libmarblewidget-qt5.so, but can be changed at runtime. To do so, use MarbleDirs::setMarbleDataPath() and MarbleDirs::setMarblePluginPath().

In short, you have to

ship all or some plugins to a folder of your choice Call
Code: Select all
 MarbleDirs::setMarblePluginPath("/your/plugins/install/folder");

ship all or some data to another folder of your choice
Call
Code: Select all
MarbleDirs::setMarbleDataPath("/your/data/install/folder");

The output you get (and likely also the segfault) happens because the compiled in plugin path does not exist on the target system, therefore Marble's plugin manager searches in / and tries to load the files it finds there.
I've found the solution here: https://stackoverflow.com/questions/38521644/error-map-theme-file-does-not-exist-qt5-application-with-third-party-librar


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]