Hello everyone,
some time ago I had developed a theme for the V3 vector maps. I would now like to start developing a theme for the V4/V5 maps
At that time, I remember that there were special functions that could only be used with Locus.
For example, I found the "growing" fonts or symbols like these very helpful:
<caption k="name" font-style="bold_italic" font-family="serif" font-size="16" fill="#7F0037" stroke="#ffffff" stroke-width="6.0" scale-font-size="15,1.3" /> or
<area src="file:patterns/military.svg" scale="1.1" scale-icon-size="14,1.2" />
Or the bg-rect... Functions like this:
<caption k="name" dy="0" font-style="bold" font-size="13" fill="#FFFFFF" scale-font-size="12,1.1" bg-rect-fill="#0100C8" bg-rect-stroke="#FFFFFFFF" bg-rect-over="5" bg-rect-stroke-width="2" bg-rect-rounded="3" />
You could do nice things with it, see screenshot:
Theme_V3_1.jpg
Is this still available for the V4/V5 maps?
Oh, lovely. A quick test with your Autobahn example: bg-rect not working 😭 OAM MF V5 map.
Quote from: jusc on November 10, 2023, 16:01:41Hello everyone,
some time ago I had developed a theme for the V3 vector maps. I would now like to start developing a theme for the V4/V5 maps
At that time, I remember that there were special functions that could only be used with Locus.
...
Is this still available for the V4/V5 maps?
The simple answer is "No".
But curve="cubic" and text-orientation="left" (etc) have been adopted into the Mapsforge renderer that Locus now uses.
Many thanks to both of you,
I'm somewhat surprised that such beautiful features no longer seem to work.
My other question is:
Is there a way to automatically scale city names, for example?
This used to be scale-font-size.
As far as I can see with the new maps and new themes, the names get smaller and smaller at higher zoom levels.
No.
Quote from: jusc on November 12, 2023, 16:28:30As far as I can see with the new maps and new themes, the names get smaller and smaller at higher zoom levels.
Well, we (have to) add more rules for specific ZL/Ranges. At performance cost probably. I have carefully hand crafted city/suburb name font sizes starting from ZL8 onwards.
As I mentioned few times before... I actively (not really last month(s)) contributed to the original MapsForge repo. Together with
@voldapet , we've improved a lot of things there and I offer my service and gladly improve more stuff.
Because it is sometimes a lot of work, I would appreciate the help of
@voldapet here to more precisely consider advantages and needs of any change that should be improved in the original MapsForge library.
as
@Menion mentioned we've already created some improvements in the official MapsForge render and adopted "cubic" or text and symbol orientation.
I also like the scale-font or scale-symbol directives but I think it doesn't fit the conception of theme when only the "rule" should specify the appearance of a particular element.
bg-rect-* are also a little bit strange and were created especially for our use-cases. Anyway, I've already thought about adopting of the "Shield" system used by Mapnik https://github.com/mapnik/mapnik/wiki/ShieldSymbolizer
It's basically a combination of image and text - especially used for highway number shields.
Hello Petr, hello menion,
Thank you for your answers.
But what is the reason that the scaling only works with the old maps?
I mainly use Locus outside with automatic zoom and map orientation in the direction of moving. It would be better anyway if the display of place names was independent of the map orientation. Just like navigation devices for cars.
But on the sofa :-) I find the scaling very pleasant and helpful.
As far as I know, this was a unique selling point of Locus among the "outdoor" apps.
Are there any plans to implement this again?
Translated with www.DeepL.com/Translator (free version)
@jusc - The V3 maps used our internal renderer, which was only available in the Locus Map Application (or still is, actually). The new LoMaps in the V4 generation use the original Mapsforge renderer, and we are limited or better we have all the capabilities of the official Mapsforge renderer. https://github.com/asamm/mapsforge/blob/master/docs/Rendertheme.md
Themes for LoMaps can use standardized directives, and our possible improvements to the renderer can be used by the Mapsforge community.
For me, it would be great if the rendering engines could be fixed to cope correctly with nested rules that use common values like "no" and "yes". Its almost like the nested rules are flattened into a set of ORs... it seems to get worse with "~|no" or "~|yes"...
@karlchick Would you please prepare a very simple theme (only a couple of rules) with an explanation what should happen and what really happens? Thanks
Quote from: karlchick on November 23, 2023, 23:01:41it seems to get worse with "~|no" or "~|yes"...
I remember there was (maybe) some logical issue with "~|<whatever>", but can't remember. Also interested in an example. Having no issues currently. And I don't see the renderer makes any problem in treating values yes/no/whatevervalue differently.