Locus Map - forum

Content & Tools => Tools => Topic started by: brotbuexe on May 02, 2012, 21:04:01

Title: [UTIL] Download / Create (Layer) Maps on PC with MOBAC
Post by: brotbuexe on May 02, 2012, 21:04:01
You can use Mobac to download map tiles and create whole maps or just layer maps for offline use on locus.
So you don't have to use your phone...
Its Java so it runs on a lot of platforms.

http://mobac.sourceforge.net (http://mobac.sourceforge.net)

For Locus you should use "RMaps SQLite" as output format.

You can use a lot of custom providers.
Like the layers from the maps forum (//http://forum.asamm.cz/viewforum.php?f=43).

Mobac caches the Tiles in its own Databases (see tilestore directory in mobac folder) named by the <name> Tag you use.
You can, if you use the same <name> tag also create multilayer maps with that maps without to have to reload already downloaded tiles.

Custom maps provider configuration for tileservers are a lot like they are configured in Locus.
To create simple layer map, use a custom map source like:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customMapSource>
<name>Cycleroutes Overlay</name>
<maxZoom>18</maxZoom>
<tileType>PNG</tileType>
<tileUpdate>None</tileUpdate>
<url>http://tile.lonvia.de/cycling/{$z}/{$x}/{$y}.png</url>
</customMapSource>

Put it as Mapname.xml in Mapsources subdirectory in Mobac program dir.
This will create transparent maps that only have Cycling routes.

If you download layers like cycleroutes, you would get download errors because of the fact that tiles that don't have anything to show (no route on them) didn't exist. Just mark the "Ignore download errors" in the atlas creation dialog when you started the creation...

Example for a multilayer map:
A Cyclemap with hillshade integrated

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customMultiLayerMapSource>
    <name>Cyclemap with double Hills and contours (Ger)</name>
    <tileType>PNG</tileType>
    <layers>
        <customMapSource>
            <name>OSM Cycle Map</name>
            <minZoom>0</minZoom>
            <maxZoom>18</maxZoom>
            <tileType>PNG</tileType>
            <tileUpdate>None</tileUpdate>
            <url>http://a.tile.opencyclemap.org/cycle/{$z}/{$x}/{$y}.png</url>
            <backgroundColor>#000000</backgroundColor>
        </customMapSource>
        <customMapSource>
            <name>HikebikemapRelief</name>
            <minZoom>0</minZoom>
            <maxZoom>18</maxZoom>
            <tileType>PNG</tileType>
            <tileUpdate>None</tileUpdate>
            <url>http://toolserver.org/~cmarqu/hill/{$z}/{$x}/{$y}.png</url>
        </customMapSource>
    </layers>
</customMultiLayerMapSource>

With Locus 2.3.X you could and should create the layers as separate maps, because you can overlay the maps in Locus. So you can use the hillshade map on different base maps on the fly in locus without recreation.

If you need more map sources you could install Locus Map Tweak on Android and then get the urls from the providers.xml in /sdcard/locus/mapsOnline/custom.

And you could use a sqlite as a map source. So you could use already (from within locus) downloaded maps.
That way you could recreate smaller maps for example or remove some zoom levels...
See the end of the readme for more information http://mobac.sourceforge.net/MOBAC/READ ... mMapSource (http://mobac.sourceforge.net/MOBAC/README.HTM#SimpleCustomMapSource)
https://mobac.svn.sourceforge.net/svnro ... source.xml (https://mobac.svn.sourceforge.net/svnroot/mobac/tags/MOBAC%201.9/v1.9.6%20final/mapsources/Example%20custom%20tile%20SQLite%20source.xml)
Title: Re: [UTIL] Download / Create (Layer) Maps on PC with MOBAC
Post by: jurajs on May 03, 2012, 11:19:53
damn... so many letters ;-)

dear brotbuexe, my i kindly ask you to attach the mapsource files as an attachment ? and maybe 2 phrases describing what to do with them to make it all work ? ;-)

Regards,
jurajs - the lazy reader
Title: Re: [UTIL] Download / Create (Layer) Maps on PC with MOBAC
Post by: brotbuexe on May 07, 2012, 18:28:18
I made a wiki page on http://docs.locusmap.eu/doku.php/commun ... s_pc_mobac (http://docs.locusmap.eu/doku.php/community:create_maps_pc_mobac)
If there is any questions post it here and I change the page to add a answer.
Title: Re: [UTIL] Download / Create (Layer) Maps on PC with MOBAC
Post by: jurajs on May 07, 2012, 19:16:53
thanks a lot...
Title: Re: [UTIL] Download / Create (Layer) Maps on PC with MOBAC
Post by: cvenzo on May 23, 2013, 19:49:14
Thanks, this is a great combination of tools!!

Just a quick question... In my MOBAC Atlas, I created several "layers" of the same area (but with different map sources).
I created the sqlitedb file and put in in /sdcard/Locus/maps.
It's detected fine, but only the last layer is displayed in Locus (and no choice to load another one)

=> my understanding is that Locus only deals with the last layer created in the Atlas, so that I have to create 1 atlas per layer. Is that correct?

thanks
Cedric
Title: Re: [UTIL] Download / Create (Layer) Maps on PC with MOBAC
Post by: Menion on May 23, 2013, 20:35:22
Hello Cedric,
  yes it's correct for now. Locus do not support multi-layer maps for now ...