This object is in archive! 

Including theme snippets

Stephan shared this question 5 years ago
Answered

I used the last seven years Osmand. I had written my changes of the theme seven years ago and I did not care about these changes for seven years. Because there is brilliant solution in Osmand to do such changes.

You write a snippet, which the values you wish to change and declare in the snippet, which theme you want to change. Then the values are changed as desired. If the basic-theme is changed, the values you wanted to be changed are still changed.

So a theme change do not touch your changes.

Is this possible in Locus and how?

Replies (5)

photo
1

Dear Stephan,

I'm not sure if I can understand...do you want to customize the default internal themes for LoMaps?

Thanks, Petr

photo
1

In my point of view, it should be possible for all available themes. Does not matter which party from.

But your question made me realising that the internal theme and external themes are two techniques. I that right?

photo
1

There are really default internal and also external themes created by Locus community. You can download some themes via Menu - Store - Graphic - filter Vector map themes. Several themes are also available at https://forum.locusmap.eu/index.php?board=40.0

More info about internal themes and how to customize them is described at https://github.com/asamm/vector-map-themes So you can customize any theme (it's XML file), create own external theme and import it into Locus. For import simply copy theme files into folder /Locus/mapsVector/_themes

How to switch theme is described https://docs.locusmap.eu/doku.php?id=manual:user_guide:maps_locusmaps&s[]=theme#switching_map_themes

Thanks,

Petr

photo
1

Hi Petr,

I think you did not understand the idea.

For example. I want to colour all streets, so I can recognize the osm-tag.

I can change the theme. But if the theme is changed by Locus or an other author, I have to do all the editing again.

So if it is possible to include snippets, I do not have this work.

I show you the code of osmand:


The snippet - it is also XML -


<renderingStyle name="Depends-Versuch2" depends="default"  version="1">
  <!--My changes-->

depends="default" means that my changes in the Theme "Default" are overwrite the values in "Default" If I change 'depends="default"' to 'depends="Elevate"' then the values are changed in Elevate. Would be nice, quick and easy.

photo
1

Hi,

I see. We use Mapsforge library for rendering of vector maps and I think that mapsforge doesn't support such snippets in themes. More about Mapsforge https://github.com/mapsforge/mapsforge/blob/master/docs/Rendertheme.md More over there isn't any official repository for all themes where you could push some customization (You probably need to send changes manually to authors).

The best solution (from my point of view) is to create completely own customized theme.

Thanks, Petr

Replies have been locked on this page!