Locus Map - forum

Support => Troubles & Questions => Topic started by: jjom on March 10, 2019, 15:19:59

Title: save tracks from kml NetworkLink for offline usage
Post by: jjom on March 10, 2019, 15:19:59
Hi,

I have a kml file with a simple NetworkLink:

<?xml version='1.0' ?><kml xmlns="http://www.opengis.net/kml/2.2"><Document><name>Trailforks-Adapter</name><NetworkLink><name>Trailforks-Adapter</name><Link><href>http://locusmaps.[...my domain...].de/adapter.php</href><viewFormat>south=[bboxSouth]&amp;west=[bboxWest]&amp;north=[bboxNorth]&amp;east=[bboxEast]&amp</viewFormat><viewRefreshMode>onStop</viewRefreshMode></Link></NetworkLink></Document></kml>

This .kml is placed in /Locus/mapItems and I can activate it.
The result are many tracks, all are nicely shown in the map.

My problem: how can I store all this tracks in Locusmaps for offline usage?

I found the option "import" for the kml file itself, but then locus maps complains about no points and no tracks found.

When I select a single track I can select "copy". But how to do this at once for 80-120 tracks?

Thanks for any suggestions!
Title: Re: save tracks from kml NetworkLink for offline usage
Post by: jjom on March 10, 2019, 22:30:56
I found a workaround:

thankfully result of adapter.php has header information:
Content-type: application/kml+xml
Content-Disposition: attachment; filename="trailforks-region.kml"

Therefore chrome offers it for download as .kml file.
(sidenote: firefox ignores the filename header part and the ending will be wrong by default)

In the "favorites" feature of locusmaps, I entered
http://locusmaps.[...my domain...].com/adapter.php?north={screenLatTop}&west={screenLonLeft}&south={screenLatBottom}&east={screenLonRight}

When I access the "favorite" in locusmaps I can tell the Chrome browser to download the file.
This downloaded kml-file my android opens by default with locus maps.
Then I can import all tracks in locus maps :-)
Title: Re: save tracks from kml NetworkLink for offline usage
Post by: Menion on March 10, 2019, 23:43:18
Hello jjom,
I'm really glad you found this, little complicated, workaround. Because some automatic method is not possible. You may manually check link where network-link point and download this file manually. Something close to what you did.