Open external map styles with the various offline maps.
Available in menu “Map | Map style”.
How to write xml based render themes to style maps:
Open external map styles with the various offline maps.
Available in menu “Map | Map style”.
How to write xml based render themes to style maps:
Yes, thanks. It is already (and still ) on my task list: Try to extract and modify original style: Show mountain_passes, do not show mountain peaks, perhaps modify icon.
Sorry, my time does not allow simultaneous work on the app and the map style.
The map styles belong to community and all users to improve and update them.
The Elevate map style of OpenAndroMaps is improved and updated constantly.
This will be simple. Also it would be nice if the map style improvements
by the users could be integrated into the default map style in the future.
Available for testing in Kurviger 2.0.11 (Beta).
Implemented in Kurviger 2.0.14.
I really like this feature, i never knew about map styles!
Simple … not for everyone
Following a hint from @devemux86 I tried to extract a style from Kurviger APK and modify it - I want to see mountain passes, but I do not want to see mountain peaks (too many - and I can not reach them with motorcycle ).
That was easier than I thought before (just remove peaks from mountain_passes layer), so I tried next step: Separate layer and other symbol for mountain peaks.
I did following:
Then edit “PeaksBlueDot.xml”:
add attribute enabled=“true” to layer with id=“mountain pass” (to enable it after loading style)
change name of layer “mountain pass” from “Peaks and mountain passes” to “Mountain passes”, also for other languages
add a further layer with id=“mountain_peak” with adapted name for all languages
→
add layer id=“mountain_peak” as overlay to layer id=“normal”
add peaks to category “mountain_peak” instead of “mountain_pass”, use symbol “dot_blue_dark.svg” instead of “peak.svg”
Afterwards ZIP the folder “PeaksBlueDot” to “PeaksBlueDot.zip” and copy it to Android device.
Result: I can open the ZIP as a style in kurviger, layer “Mountain passes” is enabled, new layer “Mountain peaks” is there:
Having a look at Sella round only mountain passes are shown - clear view:
After enabling layer “Mountain peaks” peaks are shown by blue dot - not so clear view:
So it works!
But: I tried to add an own icon before, was not succesful: Even if I copied in folder “PeaksBlueDot\symbols” peak.svg to peak1.svg without modifying the svg and changed
in line 1112 <symbol src="assets:symbols/peak.svg/>
to <symbol src="assets:symbols/peak1.svg/>
or to <symbol src="file:symbols/peak1.svg/>
it did not work.
The Name and height of the peaks I could enable on map, but no icon was shown.
I did not yet understand how I have to add a new file (has the symbol path to start with “assets:”, “file:” or “file:/” ? Or even an other suffix?
Google gave some information (interesting: mapsforge/docs/Rendertheme.md at master · mapsforge/mapsforge · GitHub ), but currently I’m stuck.
Nevertheless there is a (small) success: I could disable the peaks / make them switchable separately and give them an other symbol (but just one which was already there)
Perhaps someone has an idea - also comments from other users are welcome, let’s save the time of @devemux86 and @boldtrn for more important / more difficult topics
Thanks again to @devemux86 for implementing external map styles and giving hints concerning that topic!
So, as a first result, from my point of view, proposal for the integrated style in the future could be:
Attached you find the style ZIP, but be careful: Using it might cause unintended behaviour, test depth is extreme low. Of course feedback is welcome:
PeaksBlueDot.zip (428,4 KB)
Thanks for the detailed instructions!
The correct documentation for map styles is here.
(see also 1st post)
(the prefix “assets:” uses resources included in the app)
You need to use the “file:” prefix to use external resources.
Then xml must be at the root next to [patterns, symbols, textures].
(the “shaders” is not needed)
There is already a relevant suggestion, although without answers from users:
Thanks for the hint - although this was the same in an other sample from OpenAndroMaps, I did not see that (and might not have seen furthermore )!
So I modified it and added a modified symbol for peaks (triangle with black border and white fill) and used it - works:
PeaksWhiteTriangle.zip (428,9 KB)
Oh, it’s fantastic!
I have tried to load this style, seeing that in the layers of the map it looks you can choose and it works perfectly.
I think it would be a very interesting option to put it in the ‘default’ style
Inspired by @rumbrummer (thanks!), I decided to slightly modify the default style. I want to add objects tagged with Historic=ruins
to the Tourist attractions
layer. Indeed, it was not difficult, and it worked! I just copied the Castle
section and changed the name to Ruins
(I left the icon because the adequate one is not readable).
But I have noticed that objects tagget as Ruins appear on a different scale than Castles (> 15). Changing entries in the style file has no effect. So I guess it depends on the structure of the map? Which may also explain that not all such objects appear at all. Or is there a trick to force these objects to appear earlier, along with the all attractions (scale > 10)?
There are 2 steps:
Map creation (documentation):
“You can use the XML configuration to define which subset of the known tag set should be included in the map file and to configure the zoom levels on which map objects first appear.”
Map styles (documentation):
“The minimum / maximum zoom level on which the rule will be matched.”
In the Locus map forum you find some very active theme developers.
I think that you can get the necessary cooperation or good advice there.
Just ask, after all, it’s about identical vector base maps.
Info about multiple available themes is unfortunately rather fragmented :-((
Working in map styles is easier on the computer with (desktop) Cruiser.
Use the Reload (F5) function with map style changes.
(as does OpenAndroMaps)
In Kurviger 2.1.11 fuel stations and charging stations have separate icons - but the difference is hardly to detect, especially on a smartphone:
As a first step I modified a style where I just changed the color of the charging station to dark green:
Of course you can apply any other RBG color by choosing an other hex code instead of #0e600e (see e.g. HTML Color Picker).
Probably it would be also helpful to be able to switch fuel stations and charging stations separately … perhaps I will try later (but do not wait for it )
That was easier and faster than I thought:
I added an separate layer for charging stations just by modifieing SeparateChargingStation.xml. For details compare versions V0 and V1 - some languages might have to be reworked, especially the greek one :
SeparateChargingStationV1.zip (442,5 KB)
The changes:
Thank you so much for this tip! I thought about replacing the icon, but I would never think to edit the icon in… a text editor on my phone
I even used the color you suggested, because it is perfectly suitable. Thanks.
It is implemented in the new Version, so no need for an external style any more: