[Marble-devel] Marble with offline OSM maps

Dennis Nienhüser earthwings at gentoo.org
Tue May 15 13:50:17 UTC 2012

Hi Jeremie,

Am 15.05.2012 15:11, schrieb Jeremie Scheer:
> Ok I will try with OSM raw files first to see if it corresponds to my 
> needs.
>> You can transfer the contents of the directory to your device and 
>> they'll be automatically found and used by Marble and also 
>> applications using Marble as a library (assuming you transfer it to 
>> the right directory on the device). The directory must not be user 
>> specific, you can also use Marble's system directory (where 
>> openstreetmap.dgml gets installed to).
> The map installation directory can be in another path than Marble's 
> system directory ? My maps will be installed on a SD card that will be 
> inserted in the system, so how can I set the map directory to another 
> location in the application code ?

you've got several options to accomplish that:

(1) Use MarbleDirs::setMarbleDataPath() to have the system path point to 
some directory on the sd card (fill content as needed)
(2) Use the XDG_DATA_HOME environment variable to change the user path 
to point to the sd card
(3) Change openstreetmap.dgml to use an absolute path (on the sdcard) in 
the <sourcedir> fields

On Nokia mobile phones for example we use a combination of (2) and (3) 
such that all user retrieved (cached) data is downloaded to the largest 
partition on the device (2) and share openstreetmap data with other 
applications (3). I decided against using (1) there to prevent that 
users mess with data they should not mess with (i.e. users can safely 
wipe out the entire marble cache folder and still all map themes are 
there because they are in the system path).


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20120515/0714ad61/attachment.html>

More information about the Marble-devel mailing list