How to convert v3 Locus themes to new v4 format

Started by TrulloF, April 28, 2023, 08:06:42

0 Members and 4 Guests are viewing this topic.

TrulloF

Are there any instructions how to convert version 3 themes to be compatible with the new map format? Thanks for any hints. Even after stripping all version 3 specific tags I can't get my theme to work.
  •  

Tapio

Tapiola MFV4+ theme for OAM Maps:
Discuss - Releases - DL latest - Install latest
  •  

TrulloF

Quote from: Tapio on April 28, 2023, 09:20:39Did you already find https://github.com/mapsforge/mapsforge/blob/master/docs/Rendertheme.md
?

Fight, compare, create valid xml
Yes, but I can't find, what's wrong with it. I only get a white map with standard icons...
  •  

john_percy

@TrulloF Have you tried running your theme through an XML checker? A white map may indicate unmatched tags.


Sent from my moto g(6) plus using Tapatalk
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

TrulloF

Quote from: john_percy on April 29, 2023, 16:11:39@TrulloF Have you tried running your theme through an XML checker? A white map may indicate unmatched tags.


Sent from my moto g(6) plus using Tapatalk

Yes, I use UltraEdit. Are there any incompatible tags I may have missed? I removed Locus specific v3 stuff like scale-icon-size or bg-rect-*. Anything else to look for? I'm desperate because I like my personal theme quite much and would like to continue using it.
  •  

john_percy

#5
Have you also changed the rendertheme tag near the start of the theme?
Something like
<rendertheme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://mapsforge.org/renderTheme" xsi:schemaLocation="http://mapsforge.org/renderTheme https://raw.githubusercontent.com/mapsforge/mapsforge/master/resources/renderTheme.xsd" version="5" map-background="#F8F8F8" map-background-outside="#EEEEEE">
(This doesn't work in Tapatalk - use Webview.)
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

TrulloF

Quote from: john_percy on April 29, 2023, 22:04:56Have you also changed the rendertheme tag near the start of the theme?
Something like
<rendertheme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://mapsforge.org/renderTheme" xsi:schemaLocation="http://mapsforge.org/renderTheme https://raw.githubusercontent.com/mapsforge/mapsforge/master/resources/renderTheme.xsd" version="5" map-background="#F8F8F8" map-background-outside="#EEEEEE">
(This doesn't work in Tapatalk - use Webview.)

Copied that directly from the internal v4 Locus theme. Is there a how-to or faq available anywhere? If I use the version edited for v4 in v3 maps it works as intended.
  •  

Menion

Maybe a @voldapet may help with some tips on how he did it for the app's internal themes ...
- 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

Quote from: TrulloF on April 29, 2023, 22:26:05If I use the version edited for v4 in v3 maps it works as intended.
That shouldn't happen. The rendertheme preamble should mean that your v4 theme doesn't show up in the list of themes for v3 maps and vice versa.
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

TrulloF

Quote from: john_percy on April 30, 2023, 09:23:07
Quote from: TrulloF on April 29, 2023, 22:26:05If I use the version edited for v4 in v3 maps it works as intended.
That shouldn't happen. The rendertheme preamble should mean that your v4 theme doesn't show up in the list of themes for v3 maps and vice versa.
Sorry for the misleading description. I changed the version in the header to let it show up for v3 maps, just to check if the theme is broken. It's not, at least for v3. In v4 it shows just a white screen and standard poi icons.
  •  

john_percy

You didn't mention removing all mention of "dp"...

Sent from my moto g(6) plus using Tapatalk

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

TrulloF

Quote from: john_percy on April 30, 2023, 18:34:57You didn't mention removing all mention of "dp"...

Sent from my moto g(6) plus using Tapatalk


Ok, thank you for the hint. That might be it.
  •  

TrulloF

Quote from: john_percy on April 30, 2023, 18:34:57You didn't mention removing all mention of "dp"...

Sent from my moto g(6) plus using Tapatalk


Removed all dp instances, but still no luck... Anything else to try?
The locus theme checker doesn't throw any error.
  •  

TrulloF

Is a style menu mandatory (cat and stuff)? I don't use these in my theme.
  •  

john_percy

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