Alternative extension for link to legend

Started by john_percy, February 19, 2022, 19:02:01

0 Members and 1 Guest are viewing this topic.

john_percy

Would it be possible to have an alternative extension other than .lnk for the link to the legend for a theme? I have in mind, say, both .lnk and .link working.
Why? Currently it's a pain if you use Windows to prepare the files, as Windows assumes the file is a Windows shortcut, hides the extension and treats it accordingly.

Sent from my moto g(6) plus using Tapatalk

Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  
    The following users thanked this post: srtie4k

Menion

Hmm John, do not complicate to me the code too much please. I believe this is a minor issue, thanks  ;)
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

srtie4k

#2
Bump for visibility, dealing with .lnk files in Windows 11 is a huge nightmare. I am a theme developer who works in Windows, I built the "Adventure" theme for adventure motorcyclists (hosted over on advrider.com).

Every time I load a theme in to Locus with lnk files pointing to the legend, I get an error in the Android PDF viewer "Cannot display PDF ([theme].pdf cannot be opened).

I believe this is because Windows is appending metadata to each .lnk file whenever the OS sees the file renamed from a txt extension. If I generate the lnk file on my Android and place it in the theme folder, the legend is able to successfully open from within Locus with no error, but every time I try to offload the lnk file from my phone to my Windows machine, then transfer it back to the phone again, I get this error.

It would be nice if you could add a provision for those of us who work in Windows to get the legend link files working in our themes. Maybe even look for a standard txt file in addition to the lnk file. For the time being, I will have to make a copy of the legend PDF for the 2 theme XML files I maintain (a V3 and a V4 theme), since even a URL will not work.

john_percy

@srtie4k
The workaround that worked for me in Windows is to edit and save it as a .txt file (or even a .lnk.txt file) in Windows, upload it by FTP and then rename the uploaded file.

These days I work from my android and avoid the problem.
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

Menion

I'm a little off-topic, sorry for this, but I would like to remind to both of you, that we will be soon releasing LoMaps based on the MapsForgeV4 system. It will be then a lot easier to create themes for LoMaps and other public vector maps (OpenAndroMaps).

Unfortunately old themes for LoMaps V3 won't be usable since users update to new LoMaps.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

john_percy

Does that mean the themes that currently work for OAM will work for new Lomaps?


Sent from my moto g(6) plus using Tapatalk

Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

Menion

In the ideal world yes. But we noticed that OAM use some hack and special tags so the content of this file won't be identical ... for now ... unfortunately. It is not on me, but @voldapet should discuss this with anyone responsible for OAM maps and unite map content. Ah, this should be amazing  :)
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

michaelbechtold

Quote from: Menion on March 20, 2023, 10:34:18In the ideal world yes. But we noticed that OAM use some hack and special tags so the content of this file won't be identical ... for now ... unfortunately. It is not on me, but @voldapet should discuss this with anyone responsible for OAM maps and unite map content. Ah, this should be amazing  :)

I'm biased, as you know, but I think that Christian's tag mapping in coop with Tobias' themes is more powerful and comprehensive than LoMaps. voldapet should reach out to Christian ...
  •  

Menion

Sure I also think they contain more info. But also some "hacks" because of problems that were in the previous MF library. Anyway, it's not up to me ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •