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

Pointing a MarbleWidget to a Different Tile Location

Tags: None
(comma "," separated)
mwesterfield
Registered Member
Posts
7
Karma
0
Hi all,

I was wondering if there is a way to point a MarbleWidget to a different directory other than the "C:\Users\user\AppData\Roaming\.marble" location. I would like to have the already downloaded tiles in a directory with my application.

Also, why is everyone so adamant about downloading these tiles in bulk? My app is definitely going to be used offline and I would like to just download North America for now.

Thanks in advance!
hwdchiva
Registered Member
Posts
1
Karma
0
Hello mwesterfield,

I too am looking for the same solution. I need to download the tiles to a specific location.
I was looking at the source code for version 1.5.0 and it seems that this is not possible. The download location is hard-coded in class MarbleDirs, under function localPath().

return QString( QDir::fromNativeSeparators( appdata ) + "/.marble/data" ); // local path
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
On Linux systems at least Marble also searches $PREFIX/share/apps/marble/data/ - so you might want to check how it resolves this and try to adjust that instead. I'm assuming you're shipping Marble components alongside your own applications.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Earthwings
KDE Developer
Posts
172
Karma
1
OS
There are a couple of possibilities to use custom data paths
  • Start Marble using the --marbledatapath=<path> option to use a different system path (in Linux typically $CMAKE_INSTALL_PREFIX/share = /usr/share)
  • Set the XDG_DATA_HOME environment variable to use a different local path (in Linux typically ~/.local/share)
  • Override the path for a specific map theme by placing a custom .dgml file in the local path which use custom paths internally. This is used e.g. on Maemo to share openstreetmap tiles with other applications.

Each of those have their use cases, but neither might be straightforward to setup without some knowledge of how Marble structures its data. Feel free to explain what you want to do in more detail, maybe I can help out.


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]