Author Topic: [Theme] OS Map (v20200427 for v3 maps only)  (Read 1713 times)

Offline karlchick

  • More than Newbie
  • *
  • Posts: 40
  • Thanked: 32 times
    • View Profile
  • Device: Samsung Galaxy A3 2017
Re: [Theme] OS Map (v3 maps)
« Reply #30 on: May 03, 2020, 03:18:02 »
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.
 

Offline tapio

  • Master of Locus
  • ****
  • Posts: 663
  • Thanked: 59 times
    • View Profile
  • Device: Huawei Mate 20 X
Re: [Theme] OS Map (v3 maps)
« Reply #31 on: May 03, 2020, 06:59:28 »
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.
My BRouter profiles, based on Poutnikls: https://tiny.cc/brouterbrf
 
The following users thanked this post: Viajero Perdido

Offline FriedelXT

  • More than Newbie
  • *
  • Posts: 88
  • Thanked: 1 times
    • View Profile
  • Device: Xperia
Re: [Theme] OS Map (v3 maps)
« Reply #32 on: May 03, 2020, 14:58:05 »
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?
 

Offline karlchick

  • More than Newbie
  • *
  • Posts: 40
  • Thanked: 32 times
    • View Profile
  • Device: Samsung Galaxy A3 2017
Re: [Theme] OS Map (v3 maps)
« Reply #33 on: May 03, 2020, 15:41:23 »
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...
 

Offline Viajero Perdido

  • Apprentice of Locus
  • **
  • Posts: 130
  • Thanked: 19 times
    • View Profile
  • Device: Samsung Galaxy Tab S2 (Android 7), Blackview BV6000s (Android 6), Nexus 7 (2013) for Alpha/Beta testing.
Re: [Theme] OS Map (v3 maps)
« Reply #34 on: May 03, 2020, 18:31:23 »
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...
 

Offline FriedelXT

  • More than Newbie
  • *
  • Posts: 88
  • Thanked: 1 times
    • View Profile
  • Device: Xperia
Re: [Theme] OS Map (v3 maps)
« Reply #35 on: May 03, 2020, 19:32:28 »

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!
 

Offline poutnikl

  • Master of Locus
  • ****
  • Posts: 607
  • Thanked: 63 times
    • View Profile
    • My Brouter Profiles
  • Device: Xiaomi MI A2 (6G/128G) / A10 / LM3 Pro + LM4 alpha
Re: [Theme] OS Map (v3 maps)
« Reply #36 on: May 04, 2020, 11:47:30 »
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
https://github.com/poutnikl/Brouter-profiles/wiki
When a user digs profiles up from the GitHub repositories,
they will be hopefully wrapped in some wiki knowledge....  :-)
Try also https://github.com/poutnikl/Brouter-profiles/wiki/Determining-optimal-bicycle-profile
 

Offline FriedelXT

  • More than Newbie
  • *
  • Posts: 88
  • Thanked: 1 times
    • View Profile
  • Device: Xperia
Re: [Theme] OS Map (v3 maps)
« Reply #37 on: May 04, 2020, 19:28:33 »
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