[Theme] OS Map (v20200427 for v3 maps only)

Started by karlchick, April 19, 2020, 01:38:58

0 Members and 1 Guest are viewing this topic.

karlchick

Quote from: FriedelXT on May 03, 2020, 01:10:23
can you tell me how I can learn modify map themes?
I mean one time I saw an online editor...

As far as a I know, there is no editor for map themes...

But I can point you in the direction of some information that will tell you what you need to know:

https://github.com/mapsforge/mapsforge/blob/master/docs/Rendertheme.md

This gives a good background to creating XML theme files. the following gives you some LocusMap specific information too:

https://docs.locusmap.eu/doku.php?id=manual:advanced:map_tools:theming

In additional you will need a good text editor. I can highly recommend NotePad++ which is what I am using (the portable version, so I can keep it on a USB stick and use on any machine).

I have installed into Notepad++ a plugin called "Quick Color picker +" which allows you to modify the hex colors directly in the theme with a pop-up colour picker. You can find the plugin at:

https://github.com/nulled666/nppqcp/

I would suggest starting with modifying an existing theme that is for v3 maps, as the render engine for v4  is very intolerant to syntax errors and will refuse to display anything when one is found.

Good luck.
User id: 62b600722
Author of the OS Map Theme:
DiscussDownload
  •  

Tapio

Yeah, DIY and a decent Editor, I prefer Microsoft Visual Studio Code, an awesome editor, even many of my diehard Unix people at work like it.
Tapiola MFV4+ theme for OAM Maps:
Discuss - Releases - DL latest - Install latest

FriedelXT

Thanks for answers,
I cant use your prefered editors, because I am on Apple.
But found a good editor, i think. But till now I dont understand so much.
Its not like in "elevate".
Can you show me the passage where i can edit motorway color?
  •  

karlchick

Quote from: FriedelXT on May 03, 2020, 14:58:05
Can you show me the passage where i can edit motorway color?

Line 5948:

            <!-- Highway Cores: Motorway, OS: Blue -->
            <rule cat="day" e="way" k="highway" v="motorway">
               <line stroke="#08b8e8" stroke-width="1.4dp"  />
            </rule>
            <rule cat="night" e="way" k="highway" v="motorway">
               <line stroke="#0b8cb0" stroke-width="1.4dp"  />
            </rule>


The above is the blue core colour for motorway ways. You also need to change the motorway_link core colours at line 5792. Also the motorway labels perhaps...

I should warn you that the OS Map theme is quite a complex theme to work with as it contains 6 different map styles.

I'm currently porting this theme to v4 maps and as a result of have hit a problem changing the map background colour for night mode. So, I might split the theme into two separate themes for day and night, and probably generate the night theme from the day theme using a script.   This will reduce the size of the theme file a lot, so might improve performance for v4 maps...
User id: 62b600722
Author of the OS Map Theme:
DiscussDownload
  •  

Viajero Perdido

Quote from: FriedelXT on May 03, 2020, 14:58:05
I cant use your prefered editors, because I am on Apple.
Visual Studio Code, suggested above, does work on Apple.  https://code.visualstudio.com/Download

Also Linux, which is good news for me.  One of my to-do list items has been to find a decent editor for themes.  A task I've been sort of dreading, sort of looking forward to...
  •  

FriedelXT

Quote from: karlchick on May 03, 2020, 15:41:23

I should warn you that the OS Map theme is quite a complex theme to work with as it contains 6 different map styles.

thanks karl.
I realize already that is very complex! uff!
  •  

poutnikl

For smaller on-place changes, like a theme tweaking, there is the good Android editor Quickedit.

https://play.google.com/store/apps/details?id=com.rhmsoft.edit

It does not do code folding, but it supports XML syntax highlighting and regex.

Sent from my Xiaomi MI A2 / Android 10, via Tapatalk

FriedelXT

Thanks.
Yesterday, after hours i could tweak some things insite the theme.
- Autobahn color
- hiding parking till zoom 19
- hiding football till zoom 19
- do better viewing borders
- see earlier grass
  •